I am making a shop (button) which will be invisible for certain players who enter the game. However, when I was testing it (I was one of the certain players), the button was still there on my screen. I have no idea what mistakes occured in the script. Can someone teach me how to fix it, please?
Below is my script:
--Should the script be a local script or normal script?
local button = script.Parent
local player = game.Players.LocalPlayer
game.Players.PlayerAdded:connect(function()
local admin = ( --The players who have one of the UserIds below should not see the button.
player.UserId == 90568658 or
player.UserId == 76204529
)
if admin then
script.Parent.Visible = false
else
script.Parent.Visible = true
end
end)

5 comments
Sorry, but when I pasted it in, there is an error (Expected Identifier, got '[').
Which line?
wait i was editing the code in a normal script... Silly me! :D
it didnt work :(
:/ I have no clue then, sorry..