OnServerEvent event no longer printing anything when it's being fired

Client code:

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.

Thanks for any help.

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?

1 Like

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.

Is there more code inside of the script where you set up the OnServerEvent? If so, may we see the entire script

The only thing I believe could be a problem is if there’s an infinite loop above the OnServerEvent code

1 Like

does the remote happen to be in any non replicated place (ie ReplicatedFirst) (probably not but just a check)

1 Like

Nevermind, I have negative brain cells as usual.

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.

Thanks for the replies.

1 Like

Remote events works in all locations (but not ServerStorage or ServerScriptService)

ReplicatedStorage is only the location most used.

If it isn’t replicated to the server it won’t fire (replicated first is local only stuff like for loading screens)

Strange, when I didnt knowed which is used, I used the ReplicatedFirst and worked fine.