Alright, so I was thinking that it would be cool to make a door that slides open when you click on a surfacegui TextButton. This surfacegui would only be visible by people on an admin list else it would remain invisible.
The hierarchy is currently as follows: game.workspace.Part.SurfaceGui.TextButton.LocalScript
The code block below is the contents of the local script, however the code doesn't work. Can anyone shed light on my issue? Thanks!
wait(1)
script.Parent.Active = false
game.Players.PlayerAdded:connect(function(player)
if player.Name == 'Cubes4Life' then
print('granted')
script.Parent.Active = true
else return false
end
end)

1 comment
Have you tried your code with a Server-Sided script? ['Script' instance].