Basically this is a Gui and it creates a frame it moves etc now when it gets to a certain position i want the frame to be removed now this works
-- Start of script while true do if script.Parent.Position.X.Offset ~= 260 then wait(.1) else if script.Parent.Position.X.Offset == 260 then
script.Disabled = true
script:Destroy()
script.Parent:Destroy()
end
end
end
-- End of script
BUT It spams that Parent(script.Parent:Destroy()) is a Nil value in the output which tends to cause stress in game is their an easier way to delete them without this error?

2 comments
I do understand i actually fixed it alot easier See before i was doing one script to create the instance.new("Frame") and this script that i posted wasi n anotehr script parent to script and i cloned it into the brick
I generally stay away from while loops as you can usualy do most of the tasks with the changed event