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

How do I make this teleport gui?

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!

2 answers

✓ Accepted answer
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)

3 comments

0

Dont use repeat and while together.. It is simply repeat wait() until plr.Character

0

You are forgetting the part where I type their name into the other Gui

0

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)

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