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!

3 comments
Dont use repeat and while together.. It is simply repeat wait() until plr.Character
You are forgetting the part where I type their name into the other Gui
oh sorry, i confused myself. do not have the repeat in the script and add a bracket like so while player.Character ~= nil do wait() end)