I'm having trouble finding a good script for this so i'll ask here. What I need: When a player types for an example: "3591" The player will get teleported to some coordinates.
✓ ANSWER ACCEPTED
How do make a player get teleported if they something in chat?
1 answer
✓ Accepted answer
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
player.Chatted:Connect(function(message)
if message == "SecretMessage" then
character.HumanoidRootPart.Position = Vector3.new(X,Y,Z) -- Change X,Y,Z with your position.
end
end)
end)
end)
--[[
The script will listen to player.Chatted event when his Character is added. If the variable
message is "SecretMessage" then the script will change player's HumanoidrootPart to the position X,Y,Z.
--]]
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Use this https://developer.roblox.com/api-reference/event/Player/Chatted
And this https://developer.roblox.com/api-reference/class/TeleportService ;)
@Betuven Misinformation.
^