I have a game, where there is a wave, I am trying to get the wave to move using body position, but it doesn't work. All that happens is, the wave falls because it's not anchored.
My script:
local Part = script.Parent local newPos = Part.Position + Vector3.new(1500,0,0) local Time = 10 local Increment = 0.5 local startWave = workspace:WaitForChild('startWave') local Diff = newPos - Part.Position local Mag = Diff.magnitude function MovePart() script.Parent.BodyPosition.Position = Vector3.new(newPos) wait( (Time/Mag) * Increment ) end startWave.Changed:Connect(MovePart)
My hierarchy, and my BodyPosition properties
Any help is appreciated, thanks. (There are no errors in console)
Chances are that using a BodyForce for your object won't be sufficient without a greater force, try increasing the MaxForce by quite a substantial amount and see if that solves your problem.