I am making a player choose map gui and it just gives me an error on this script why?
while true do wait(0.2) if script.Parent.Parent.Name == "PlayerGUI" then wait(5) script.Parent:Destroy() end end
ERROR: choosemap=1 Players.Player1.PlayerGui.MapGUI.Script:3: attempt to index field 'Parent' (a nil value) Stack Begin Script 'Players.Player1.PlayerGui.MapGUI.Script', Line 3 Stack End