gunScript bug: Shooting stops working when an Entity with NUI Entity Health is destroyed

Describe the bug:

  1. If you use NUI Entity Health for a Mesh, and shoot it until it destroys, sometimes the Player is unable to shoot or reload from their Gun

How do you cause this bug?

  • List the steps
    Follow the steps to use the NUI Entity Health Package and shoot the Entity with your Gun until it gets destroyed

Screenshots / video of bug:

Which platform: PC / Stadia

Which input: Controller / keyboard + mouse

Your Crayta username: || Varunastra ||

Game seen in (including “Hub” or “Editor for XYZ”): Any game

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): Sometimes, it is happening because the hitEntity reference gets set to nil abruptly while the Player is shooting

How to fix:
Add this code inside gunScript

Time + date seen:

Version number (found in Help tab in Settings):

(PC only) hardware specs (upload dxdiag file if possible - Open and run DxDiag.exe - Microsoft Support):

The more information you provide, the more likely it is that this bug can be fixed quickly! Also, if this was discussed in Discord / Reddit / elsewhere, it might help to include a screenshot of that discussion!

Hi there @Varun_Aiyar

I’m not able to reproduce this at the moment. I’m using the Team Deathmatch game blueprint and set up a mesh with 100000 health using the steps from this page NUI - Entity Health Bar When previewing and shooting the mesh I can empty the clip, the gun reloads and then I can empty the next clip etc etc. I’m not having the gun be unable to shoot or reload. When I tried this using the gun game blueprint instead I found the shotgun made what sounded like an incorrect sound effect sometimes while firing, but I still didn’t encounter issues reloading or firing.

Are you able to supply a game example with this set up where the issue reproduces at all please? That way I can grab a copy and check it out.

Sorry for the late reply, I followed the steps I mentioned in this post and the bug was present.

Thanks Varun, I think I missed the part where it only occurs after the target is destroyed. I’ve reproduced this now and passed a report through for it to be looked into.

1 Like