What do you want to achieve?
I want to fix the bug where when I respawn, my controls (cant move at all) don’t work.
What is the issue?
When I use
-- Local Script
local Controls = require(player.PlayerScripts:WaitForChild("PlayerModule")):GetControls()
Controls:Disable()
Controls:Enable()
It works fine, but when I respawn, my controls are disabled for some reason. It works perfectly fine before respawning though. Also, sometimes, when I respawn, I walk in one direction and I can’t stop it.
What solutions have you tried so far?
I have tried putting a Controls:Enable() part before respawning, but it seems it does not work. Also, for some reason, when some other player attacks the stuck player, it un-stucks them as the attack uses Controls:Disable() then it waits then uses Controls:Enable().
I found out the solution! To fix my problem, I just placed the local script in StarterPlayerScripts instead of StarterCharacterScripts. It fixed my problem since when it was in StarterCharacterScripts it would break every time I respawned because it would reset if the character reseted. I finally solved the problem I had for weeks, and if anyone else comes into this problem just check if its placed in its correct parent, StarterPlayerScripts.
Hello I have come across the same problem. For my situation I have already correctly placed my script inside StarterPlayerScripts but the problem is whenever I try to set the player controls to Enable() when the humanoid died or when the player respawns it’s stuck too. If I never disable the controls in my script the issue won’t happen. If there’s anyway to fix that I would really appreciate it. In the meantime I’ll try to find another way to prevent the player from walking during the specific time in my script.
Yes I was using Disable() method. I solved the problem, I need to initiate the controls by disabling it once and enabling them right after to be able to make the switch and toggle them freely during the game runtime.