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

GUI Only Appears To Me?

Asked by 9 years ago

Hi there, I'm new to scripting and I'm making a Teleport GUI. I watch tutorials in youtube but the only thing I want is the GUI Only Appears To Me. Is This Necessary? This is the Script

spawn = game.Workspace.HouseArea
player = script.Parent.Parent.Parent.Parent

function onClicked()
    player.Character:MoveTo(spawn.Position)
end

script.Parent.MouseButton1Down:connect(onClicked)

1 answer

Log in to vote
1
Answered by 9 years ago

This script should work. Although, if you want you and ONLY you to see the GUI, then it needs to be moved to the Player Gui.

To do this, you might as well just see if the player who enters the game has your name, if so, Clone GUI into your PlayerGui. Just put your GUI inside of ReplicatedStorage and add a normal script inside of workspace.

the script should look something like this, to give it to the player. Just fill in the strings correctly.


game.Players.PlayerAdded:connect(function(plr) if plr.Name == "PutYourNameHere" then local MoveGui = game.ReplicatedStorage["TheGui'sNameHere"]:Clone() MoveGui.Parent = plr.PlayerGui end end)
0
How about if I want the whole players to teleport? CjGamer1454 0 — 9y
0
What do you mean the whole players to teleport? Do you mean you want everyone to teleport as you click, or everyone to have the GUI? alphawolvess 1784 — 9y
Ad

Answer this question