So i have this anticheat thing that is supposed to delete gui's that were randomly added to playergui but for some reason i got this warning:
Something unexpectedly tried to set the parent of ScreenGui to NULL while trying to set the parent of ScreenGui. Current parent is PlayerGui. (x58) - Studio
Script:
while wait(0.3) do
game.Players.LocalPlayer.PlayerGui.ChildAdded:Connect(function(child)
if child.ClassName == "ScreenGui" then
child:Remove()
end
end)
end

1 comment
Have you tried using "child:Destroy()" instead of "child:Remove()"?