script.Parent:GetAttributeChangedSignal("IsAlive"):Connect(function()
--//Stop all animations when the player dies
for i,v in pairs(humanoid:GetPlayingAnimationTracks()) do
v:Stop()
end
if isPlayerDowned() then
print'roblox is failing to work'
updateArmRotation:FireServer()
end
end)
And the remote event code, which loads without error:
updateArmRotation.OnServerEvent:Connect(function() --//Updates the player's arm rotation depending on if they're downed or not
print'roblox is super dumb'
local isDowned = characterModel:GetAttribute("IsDowned")
print'roblox sucks sometimes'
setToolHoldEnabled(not isDowned)
end)
Now, I have no idea what’s going on. I can confirm this exact remote event is being fired locally, but I’ve yet to see it print anything.
So the roblox is failing to work is correctly printing but anything in the OnServerEvent isn’t? Does the OnServerEvent still work when firing? If not, is the event connected in the first place?
Yep. The local print statement is outputted, and there’s no error so I assume the :FireServer() call is running as well. Just nothing happens from the OnServerEvent event.
Very brain boggling as this was previously working fine.
When the player dies I remove the player’s character and use it as a corpse. That includes removing all the scripts in the character and I took a different approach with my remote events, storing some of them directly in the character model as I thought that was better for what I was trying to accomplish. And I was attempting to fire that remote event after the player’s died state was set to true.