So I am making a teleport gui where I put somebody's name in the GUI and they teleport to this block. This is what I have.
script.Parent.MouseButton1Click:connect(function() game.Workspace..script.Parent.Name.Text..Torso.CFrame = game.Workspace.TorsoPosition end)
it doesn't seem to work. Help!
local player = game.Players.LocalPlayer repeat while player.Character ~= nil do wait() end local character = player.Character script.Parent.MouseButton1Down:connect(function() character.Torso.CFrame = game.Workspace.Part.CFrame end)