This script WAS working, until I added the GUI configuring parts to the script. This script is supposed to teleport the player to R2D when they chat "r2d" (With :lower()) This script is a regular script in a GUI:
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
msg = msg:lower()
if msg == "r2d" then
script.Parent.TpName.Visible = true
script.Parent.TpTo.Visible = true
script.Parent.Frame.BackgroundTransparency = 0.8
wait(1)
script.Parent.Frame.BackgroundTransparency = 0.6
wait(1)
script.Parent.Frame.BackgroundTransparency = 0.4
wait(1)
script.Parent.Frame.BackgroundTransparency = 0.2
wait(1)
script.Parent.Frame.BackgroundTransparency = 0
wait(2)
game:GetService("TeleportService"):Teleport(147513144,plr) -- I didn't put the real R2D ID here. It's just a random ID to test this.
end
end)
end)

3 comments
First you can't test the Place when you're on Studio.
Are you waiting 6 seconds after you chat?
^^they both make a point