So, I’ve been using my custom rank door script for ages, but now I keep getting greeted with this error. Does anyone know how to fix it?
Can we see the script please?
The error says that it cannot find something called Rank Doors
inside the PlayerGui, are you sure you should be in the player instance or should you be in the workspace?
I have put a local script inside of the StarterGUI, and used the same script as I always do. I never encountered this error but it’s only started happening recently.
I can send the whole script if you wish.
local GroupId = 11501504
local RequiredRank = 4
-- Do not edit this
for i, v in pairs(game.Workspace:WaitForChild("RankDoors"):GetChildren()) do
if v:IsA("Part") then
if Player:GetRankInGroup(GroupId) >= RequiredRank then
v:Destroy()
print(game.Players.LocalPlayer.Name..' can use the staff doors.')
end
end
end
local GroupId = 11501504
local RequiredRank = 4
-- Do not edit this
for i, v in pairs(game.Workspace:WaitForChild("RankDoors"):GetChildren()) do
if v:IsA("Part") then
print(v.Name)
end
end
Try this and see if it works.
Thanks for the help!
Wait, I know the error.
local GroupId = 11501504
local RequiredRank = 4
-- Do not edit this
for i, v in pairs(game.Workspace:WaitForChild("RankDoors"):GetChildren()) do
if v:IsA("Part") then
if game.Players.LocalPlayer:GetRankInGroup(GroupId) >= RequiredRank then
v:Destroy()
print(game.Players.LocalPlayer.Name..' can use the staff doors.')
end
end
end
You didn’t define the player.
1 Like
Ohhh, thanks so much for the help!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.