Disconnect all remoteevents when unequipping a tool

Okay, so just to confirm:

  1. Your viewmodel set up works, but the animations aren’t working
  2. You’ve not changed any RemoteEvent names nor anything in the script
  3. You’ve tried this on all 3 tools, and restarted the playtest multiple times resulting in intermittent breaking

If the viewmodel is working but your animations aren’t, then the problem is outside of the animations script. If the viewmodel doesn’t work but you’re still able to shoot / reload and see the effects, then it is the animation script. If either doesn’t work, then the problem is within the server script.

I would try to add print states in any possible function for all 3. This will help you isolate the issue, since you have direct access to the studio and you have a better vision on the system itself.

Unfortunately I’m going to be gone for the rest of the day, but I will come back here and check for any update with the issue. I hope that you will find the source of the issue with these methods, and if you need immediate help with the code, I suggest using ChatGPT for now; otherwise, I would ask here for help.

I see, so then the problem is within the animation script. I would just use the solution version for now, since it is working as intended.

Wasn’t this post marked as solved a few minutes ago?

Edit: 63 comments no solution

Yes, the solution works but we ended up trying to re-use the code for other tools in his game. In result of changing the variable names for the connections and remotes, it ended up stop working completely. So this is kind of a new issue in a single thread.

1 Like

ok so it works now ig thx for all the help and if it stops working again ill just reply here

Alright sounds good. I don’t see how changing the variable names broke the script, but I do know that it will take a lot more than just changing the names to make it work with the same code.

Hopefully someone finds a solution for you on that.

oh and can i use ur name in the credits for solving it

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.