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

Why wont this GUI for a certain person only work?

Asked by 8 years ago

I just it to give it a certain person

repeat wait() 
until game.Players.LocalPlayer 

Player = game.Players.LocalPlayer 
Gui = game.StarterGui.ServerSystem.Button

if Player.Name == "Player" then 
Gui.Visible = true
else 
Gui.Visible = false
end

1 answer

Log in to vote
2
Answered by 8 years ago

Rather than modifying StarterGui, you should instead modify the player's PlayerGui.

Instead of this:

Gui = game.StarterGui.ServerSystem.Button

You should do this:

Gui = player.PlayerGui.ServerSystem.Button

This access the LocalPlayer's PlayerGui and its contents.

I hope this helps. Good luck!

Ad

Answer this question