Script :
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if msg == "Respawn" then
plr.Character.Humanoid:TakeDamage(100)
end
end)
end)
Script :
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if msg == "Respawn" then
plr.Character.Humanoid:TakeDamage(100)
end
end)
end)
There's a bug where the roblox chat adds a space at the end of your message.
Try this code until that bug is patched
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if string.sub(msg, 1, #msg - 1) == "Respawn" then
plr:LoadCharacter()
end
end)
end)
Also, player:LoadCharacter() would be the way to proceed on respawning
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
ty