Ive been stuck :/ read the title please. Any help?
COMMUNITY QUESTION
How to make it so when you press an object a ui is visible for that player only?
1 answer
-not a request site :/-
But, this is easy anyways.
local plr = game.Players.LocalPlayer --gets the player
local ui = plr.PlayerGui.ScreenGui.Frame --gets your ui
script.Parent.ClickDetector.MouseClick:Connect(function(player) --detects a click function
if player == plr then -- if the player parameter equals the given variable...
ui.Visible = true --then it will turn on
else
ui.Visible = false --or else, it will not be
end
end)
I was in a rush to write this, so idk if it's fully correct, but I'm pretty sure it is. Hope it helps!
1 comment
0
Accept this answer if it was right jsyk
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Like a screen gui? Billboard gui? Info please
Oh jus realised its not a gui, Its and actual ui. thought you mispelled, Not sure
yes it is a screen gui I would like to make it so when I press a locker a screen gui