Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to destroy a locked character?

Is there any way for a client to destroy a character on the server side that is locked? I have been struggling with this and I've come to the conclusion that it may not be possible. Within testing, when the character isn't locked, the client can kill the character just fine, but as soon as it's locked, I have trouble killing it.

1 comment

0

What are you trying to accomplish with this? Just asking to get a better understanding of why and what you are trying to do.

1 answer

I don't know why would u want to "Destroy" a character, but if you're having problems with killing it on client, do it on the server.

--LocalScript
Remote:FireServer() -- remember the remote variable has to be a RemoteEvent, and it has to be the same instance in client than in server

--ServerScript
Remote.OnServerEvent:Connect(function(player)
	player.Character:Destroy()
	--or
	player.Character.Humanoid.Health = 0
end)

As you haven't explained well, this is all I can help with, I hope this is what u wanted.

2 comments

0

The Remote variable needs to be a RemoteEvent for this to work, they need to be the same instance on client and server

0

Who up voted this guy the answer is incorrect replace Remote.OnClientEvent with Remote.OnServerEvent

This discussion is preserved as it was. New answers, comments, and votes are closed.