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

How can I make a Teleportation script using a gui ?

Asked by 8 years ago

The problem with my script its how can I Find A player when he joins without knowing his name so

script.Parent.MouseButton1Click:connect(function()
    local Player = ?
    if Player then
        local Torso = Player:FindFIrstChild("Torso")
        if Torso then
            Player.Torso.CFrame = CFrame.new(Vector3.new(-107, 0.6, 17))
        end
    end
end)

How could I make a player thing when its in game.StarterGui.TeamAdder.TeamMain.Teacher.Script and I need the player that is in the game.Workspace liekw hen you go in Play Solo its Player1 how can I find it threw a clicked function?

0
Where is this script? Also, FindFirstChild in line 4. Not FindFIrstChild. Pyrondon 2089 — 8y
0
I know I made a typo and did not realise it but that script is in game.StarterGui.TeamAdder.TeamMian.Teacher.Script johndeer2233 439 — 8y
0
Is 'Teacher' an ImageButton/TextButton? Pyrondon 2089 — 8y
0
a team johndeer2233 439 — 8y
0
a textbutton sorry lol its a team and a textbutton johndeer2233 439 — 8y

Answer this question