local plr = game.Players.LocalPlayer
game.Players.PlayerAdded:Connect(function(plr)
if plr.Name == "V_anze" then print("ok")
if not plr.Name == "V_anze" then
game.Players.LocalPlayer.PlayerGui.Cmdr:Destroy()
end
end
end)
I'm confused on why it's not working.
I'm pretty new with scripting.
Your code has logic issues. No worries, here is a fix.
01 | local plr = game.Players.LocalPlayer |
02 |
03 | game.Players.PlayerAdded:Connect( |
04 | function (plr) |
05 | if plr.Name = = "V_anze" then |
06 | print ( "ok" ) |
07 | else |
08 | game.Players.LocalPlayer.PlayerGui.Cmdr:Destroy() |
09 | end |
10 | end |
11 | ) |
Remember to accept the answer if is it helpful for you! I'm glad to help :)