local groupId = 5144614 local Admin = game.Players.LocalPlayer.importantplr.Admin function added(player) if game.Players.LocalPlayer:GetRankInGroup(groupId) <= 16 then game.Players.LocalPlayer:WaitForChild("importantplr") game.Players.LocalPlayer.importantplr:WaitForChild("Admin") Admin.Value = true else Admin.Value = false end end game.Players.PlayerAdded:connect(added)
Its purpose is to change a value known as admin, which is a boolean that is used so my scripts can read it and then decide if the player should see somethings or not. It keeps niling. I dont understand why, thanks for the help.
I'd write your code like this...
I changed the function format(does the same thing) also changed your "local player" to player since the playeradded function will give you the player
local groupId = 5144614 game.Players.PlayerAdded:Connect(function(player) local Admin = player:WaitForChild(importantplr).Admin if player:GetRankInGroup(groupId) <= 16 then Admin.Value = true else Admin.Value = false end end)