I have an issue where If I die while playing an animation that disables my controls, the player won't be able to move after respawning. I need to be able to discern when the player dies, which (I believe) is only able to be done server side, but I also need to be able to enable the controls, which can only be done client side. I tried both a module script and a remove event, and neither would work in this situation. Is there any way to do this or do I have to use a different method to reenable the controls. If you want the code, here
game:GetService('Players').PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
local Controls = require(plr.PlayerScripts.PlayerModule):GetControls()
local controls = game.Players:GetPlayerFromCharacter("model")
controls.Controls:Enable(true)
end)
end)
end)
Error: "PlayerScripts is not a valid member of Player "Players.iiFloxy""

1 comment
This should work If i use a remote event, but you saw on my other question UIS isn't working so I can't confirm if it will work or not yet