So I have this script here that teleports a player, but the only issue is, it doesn;t when I play the game; only when I test in studio does it work. It is a regular script and I am not sure what I should try. Anyone have any insight?
script.Parent.MouseButton1Click:connect(function()
local TeleportTo = game.Workspace:FindFirstChild("Tp2")
local Player = script.Parent.Parent.Parent.Parent
local Character = Player.Character
local Torso = Character:WaitForChild("Torso")
Torso.CFrame = TeleportTo.CFrame * CFrame.new(0,0,20)
end)
