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

Why doesn't this teleport screen gui work?

Asked by
Akozta 40
8 years ago
torso = script.Parent.Parent.Parent.Parent.Character.Torso 

function onClicked(GUI)
        torso.CFrame = CFrame.new(Vector3.new(0,0,0)) 

script.Parent.MouseButton1Click:connect(onClicked)

FYI, i'm not getting anything in my output

4
You are defintely getting an error... Shawnyg 4330 — 8y
1
Definitely you should get an error with that script.... First off there is no end for the function... KingLoneCat 2642 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Here's the script please give me a reputation after here

script.Parent.MouseButton1Click:connect(function()
for i,v in pairs(game.Players:GetPlayers()) do
    local teleportplace = game.Workspace.Part
    local name = v.Name
    local check1 = game.Workspace:FindFirstChild(name)
    local check2 = check1:FindFirstChild("Humanoid")
    v.Character:MoveTo(teleportplace.Position)
    end
end)

0
Please Vote me a good Vote if this worked johndeer2233 439 — 8y
0
Whoops you wanted a gui one just wait a sec ill fix this johndeer2233 439 — 8y
Ad

Answer this question