✓ Accepted answer
u would loop ipairs which looks into every players inventory
example
for i=1, math.huge do
wait()
for i,v in ipairs(game.Players:GetChildren()) do
if v:FindFirstChild('PlayerGui') then
if v.PlayerGui:FindFirstChild('ClassGui') then
v.PlayerGui.ClassGui:Destroy()
end
end
end
end
i, v pairs mean index, variable pairs. In this case the index is game.Players so it is searching for variables of the index i.e. all the children of game.Players. After that just kind of verify that the variable in players is a player by looking for PlayerGui then verify they have ClassGui then destroy ClassGui if they have it.
1 comment
Bumppp