Hello, Im trying to make a script where you say a word in the chat and it teleports you to another game. Im having troubles doing it, could anybody help me. Thanks
✓ ANSWER ACCEPTED
Need Help With Chat Activated Teleport?
1 answer
✓ Accepted answer
You should use the Player.Chatted event, alongside TeleportService.
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local chatcommand = "/teleport" --change to whatever you want
local destinationID = 00000 --Change to destination place ID
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message:sub(1, chatcommand:len()):lower() == chatcommand then
TeleportService:Teleport(destinationID, player)
end
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
OMG YOU JOIN 2007