im not sure if there was an engine update but recently ive been experiencing some sort of sync failure with the controls module when respawning. im aware that the module updates to new characters but it seems to have issues with states
for many years ive done something along the lines of this to toggle player controls from either server or client depending and its worked fine no problem until now. this script is in StarterCharacterScripts, i can put it in StarterPlayerScripts which fixes it but i first encountered this bug in a localscript in one of my other projects where i need to check to enable controls upon respawning due to actions that disable it. im aware this is a strange method that no one probably uses but its more reliable than anchoring humanoidrootpart or using DevComputerMovementMode/DevTouchMovementMode so im not complaining
local player = game.Players.LocalPlayer
local PlayerScripts = player.PlayerScripts
local controls = require(PlayerScripts:WaitForChild("PlayerModule")):GetControls()
local function busyPing(temp: boolean?)
local busy = player:GetAttribute("busy")
if busy == true or busy == nil then
if temp then
controls:Enable() -- temp until bug is fixed
end
controls:Disable()
elseif busy == false then
if temp then
controls:Disable() -- temp until bug is fixed
end
controls:Enable()
end
end
player:GetAttributeChangedSignal("busy"):Connect(busyPing)
busyPing(true)
an example of how this is an inconvenience is that i can disable controls but if im holding W it will make me keep moving forward and the only fix is to re-require the module. although i could easily just add a wait to require the module again and call busyPing again, thats not the point because theres no indicator that the module is broken anyway. here i get respawned and im holding W then I let go and im still moving although the controls module still points to my new humanoid
the only fix is to call the opposite then the state you want (since it doesnt try to update to the same state if it already thinks thats what the current state is) but the issue is that i never used to have to do this and ive been using this method since like 2023 so of course i noticed immediately when it broke
controls:Disable()
controls:Enable()
heres one of my projects where i need to handle controls in a script that resets upon respawning because actions like emoting or being in a menu disables controls and resetting would cause them to be softlocked without this. i temporarily removed my fix and i continue walking forward (if i wasnt holding w i wouldnt be able to move at all when respawning)
and the module is still the same and it updates to the new humaniod
print(controls == require(PlayerScripts:WaitForChild("PlayerModule")):GetControls())
![]()
sorry that i explained this poorly but tldr: control module fails to sync properly when its used in a script that restarts after respawning