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

Need Help With Chat Activated Teleport?

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

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)

1 comment

0

OMG YOU JOIN 2007

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