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

how can i make a player respawn when they say "respawn"?

local plr = game.Players.LocalPlayer
plr.Chatted:Connect(function(msg)
-- i'm stuck here
plr:LoadCharacter()
end)

1 answer

✓ Accepted answer
local plr = game.Players.LocalPlayer
plr.Chatted:Connect(function(msg)
if msg:sub(1,7) == "respawn" then
plr:LoadCharacter()
end
end)

You just need an if statement to detect what the player said and if it is equal to something.

4 comments

0

omg fix the indentation its making my eyes bleed

0

lel

0

never hehe i'm on mobile

0

why u a mobile peasant then

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