Hello,
so i’ve been trying to like make a car on a road and give it the illusion that it moves.
everyone knows that classic illusion where you move the surroundings instead of the car!
but when i want to move a bush (it works actually but just wait) and it reaches it’s position where it needs to be destroyed (preventing lag) it doesn’t get destroyed…
Code:
local Part = script.Parent
local LimitZ = 71.736
repeat
Part.Position -= Vector3.new(0,0,5)
wait(0.1)
until Part.Position.Z == LimitZ
Part:Destroy()
The Reason Why I Used Position.Z is Because I Want To Put This In ReplicatedStorage
so that i can clone it and spawn it on random X positions .
this script is only the movement the bush will do as soon as it spawns into the map.
to prevent lag because im cloning stuff, i destroy the part after it reaches a certain point.
(it ofc doesn’t work though)
Thanks In Advance!