Here is the script (for a pop up)
for i = 1,20 do script.Parent.Position = UDim2.new(math.random(20,60)/250,0,math.random(20,60)/250,0) script.Parent:TweenSize(UDim2.new(0, 250,0, 250),"Out","Bounce",1,true) wait(1.5) script.Parent:TweenSize(UDim2.new(0, 250,0, 250),"Out","Linear",0.3,true) wait(0.4) script.Parent:Destroy() end
I'm asuming your error is here: script.Parent.Position =
since i don't see any other .Position anywhere else inside the for loop.
You are receiving that error because you destroy the parent object script.Parent:Destroy()
at the end of that iteration of the loop, then once it goes to the next number the parent object is not there anymore because it was destroyed
Is the script parented a GuiObject [Frame/ScrollingFrame/ViewportFrame/TextLabel/TextButton/ImageLabel/ImageButton]? If not, parent it to a guiObject!