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

When my character dies. I want to respawn "INSTANTLY!"`?

So basically I'm going to try to exploit my friends game for testing purposes. He's paying me som robux. And I want to make a script that basically will crash hes server. Don't worry its totally fine for him and he's paying me 150 robux for doing this.

So basically I need a script that I can execute in he's server. And when I reset my character I should respawn at once. No delay.

5 comments

0

char:LoadCharacter()

0

char:LoadCharacter():1: attempt to index global 'char' (a nil value)

0

Try game.Players.USER.Character.Humanoid.Died:Connect(function() game.Players.USER.Character:LoadCharacter() end) --This must be in a server script.

0

Burgerkinghappy. Im testing my friends anti exploit system so he cant add stuff to the server script:/ ty for reply tho.

0

for the people that dont need it in script form just go to the respawn timer in "Players"

1 answer

Here's the solution:

function onAdded(plr)
	plr.Character.Humanoid.Died:Connect(function()
		plr:LoadCharacter()
	end
end

The function "onAdded" will fire every time a player joins the game. If they reset themselves they will instantly spawn back due to "plr.LoadCharacter()" If you want to add a delay to when they respawn, use wait() and put the delay (seconds) in the parenthesis.

2 comments

0

Silvercreeper. Lets say im a exploiter. And I want to join my friends roblox game and exploit it for testing purposes. Then I have to execute the script via and lua executor. Remember im not the game creator

0

Just do game.Players.LocalPlayer:LoadCharacter() It's client sided so it should work.

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