Fast Cast bullets disappear after I force the gun's parent to the player's backpack

Hi, I’ve heard of Fast Cast for a while now and started using it a few months ago. When I’m scripting upgrades, I encountered a problem that was the player was able to shoot during the upgrade screen. I thought of a few solutions such as disabling it, but that just bugs because it says “Did you forget to implement OnServerEvent for MouseEvent?”. I found another solution, which is to set the gun’s parent to the player’s backpack during the upgrade screen, and put it back into character when the upgrade screen had disappeared. Please note that the backpack Gui is hidden. Ive debugged it and it seems like the problem is because of the sudden parenting itself, not because i changed a value.

One last thing to note, I used the demo version and heavily modified it to fit my game. Heres the game file, since there are some hard-coded features (I dont know if it is called hard coding):

Game.rbxl (420.4 KB)

Edit: Sorry if my scripts are messy. I am kind of a beginner to roblox’s LUA.

Heres the video where the bug happens (the first part shows that the gun works fine at first, skip to 0:25 if you want to see the problem):

As you can see, there is zero output errors. All it did was change the BULLET_MAX_ANGLE by -1.

I overlooked the Client script. I am a doo doo head. (Basically theres the boolean where you can adjust to make it so you can shoot or not in the client’s script)

1 Like

Alright, it somehow broke again. Can anyone explain this?

Game.rbxl (419.4 KB)