Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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.

0
char:LoadCharacter() theking48989987 2147 — 5y
0
char:LoadCharacter():1: attempt to index global 'char' (a nil value) Skydoeskey 108 — 5y
0
Try game.Players.USER.Character.Humanoid.Died:Connect(function() game.Players.USER.Character:LoadCharacter() end) --This must be in a server script. BurgerKingHappy_Meal 25 — 5y
0
Burgerkinghappy. Im testing my friends anti exploit system so he cant add stuff to the server script:/ ty for reply tho. Skydoeskey 108 — 5y
0
for the people that dont need it in script form just go to the respawn timer in "Players" Fad99 286 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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.

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 Skydoeskey 108 — 5y
0
Just do game.Players.LocalPlayer:LoadCharacter() It's client sided so it should work. SilverCreeper58 23 — 5y
Ad

Answer this question