Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make this teleport gui?

Asked by
Zelnus 30
9 years ago

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

Log in to vote
0
Answered by 9 years ago
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)
0
Dont use repeat and while together.. It is simply repeat wait() until plr.Character unmiss 337 — 9y
0
You are forgetting the part where I type their name into the other Gui Zelnus 30 — 9y
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) GullibleChapV2 155 — 9y
Ad
Log in to vote
0
Answered by 9 years ago
hi 

Answer this question