local plr = game.Players.LocalPlayer
plr.Chatted:Connect(function(msg)
-- i'm stuck here
plr:LoadCharacter()
end)
✓ ANSWER ACCEPTED
how can i make a player respawn when they say "respawn"?
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
omg fix the indentation its making my eyes bleed
lel
never hehe i'm on mobile
why u a mobile peasant then