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.
local plr = game.Players.LocalPlayer game.Players.PlayerAdded:Connect( function(plr) if plr.Name == "V_anze" then print("ok") else game.Players.LocalPlayer.PlayerGui.Cmdr:Destroy() end end )
Remember to accept the answer if is it helpful for you! I'm glad to help :)