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

How can I fix a GUI appearing to everyone?

Asked by 4 years ago

game.Workspace.Stand.WandDealer.Value.Changed:Connect(function() if game.Workspace.Stand.WandDealer.Value.Value == true then script.Parent.Enabled = true end end)

How exactly can I fix this? Also it activates once a value is changed. I want it to appear only to one person but it doesn't work after I've tried to change it.

1 answer

Log in to vote
1
Answered by
Slatryte 104
4 years ago

I believe I know how you can fix this. There is probably more ways, but I recommend this one.

--Make sure to turn Visable off on the GUI.
local player = game.Players.LocalPlayer
local playerName = " " --Insert player name here.
local GuiName = game.StarterGui. --Insert GUI name here.
if player.Name == playerName then
GuiName.Visable = true
end

I hope this works out for you, and best of luck! If this script doesn't work, it's probably because I have some more to learn. But it should work.

0
Two things: Never use the StarterGui for the LocalPlayer. Consider indenting your code as this can lead to a bad habit, and you also spelled Visible wrong not to be rude. Tyler090130 619 — 4y
1
The property Visable is spelt like that... Slatryte 104 — 4y
1
Uh, sorry 'bout dat. Kinda messed up. Try this on the "if" area: if player.Character.Name == playerName then Slatryte 104 — 4y
Ad

Answer this question