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

How do I respawn a Player with a LocalScript?

Asked by
Kratos232 105
9 years ago

Hi. How would I Respawn a Player with a LocalScript? I can't use a Normal Script because of other reasons, so it needs to be a LocalScript. I tried random stuff like putting a respawn script inside the LocalScript, then making it'd Disabled false, but it only works on Studios. So, is it even possible to respawn someone with a LocalScript?

2 answers

Log in to vote
1
Answered by
Merely 2122 Moderation Voter Community Moderator
9 years ago

Make a LocalScript in StarterGui:

local player = game:GetService("Players").LocalPlayer

wait(10)
player:LoadCharacter() -- respawn the character
0
No, then they will respawn every 10 seconds. And I need to respawn people in a LocalScript that's in a TextButton. Kratos232 105 — 9y
0
It's just an example of how to respawn a player. You want to call LoadCharacter inside your TextButton click handler. Merely 2122 — 9y
0
It doesn't work in the TextButton. Kratos232 105 — 9y
Ad
Log in to vote
-1
Answered by 9 years ago
local plr = game.Players:Getchildren() --Get Children
wait(10) --Wait 10 Seconds
for I = 1, #plr do --This Will Select Everything That Is In Players
plr[I]:LoadCharacter() --You Know This
end -- End Line 3
0
This was... Useless. Doesn't work with a LocalScript. I already knew all of this. Kratos232 105 — 9y

Answer this question