So I'm basically trying to make a moving platform for a obby. I'm using bodyposition because I want the player to move with it. For some reason, the platform doesn't move though. Here's my code:
model = workspace.MovingPlatform2
model.BodyPosition.Position = Vector3.new(179.317, 7.937, -611.755)
model.BodyPosition.MaxForce = Vector3.new(math.huge, 0, 0)
while true do
for i=1, 24, 1 do
model.BodyPosition.Position = Vector3.new(model.BodyPosition.Position.X + 0.5,
model.BodyPosition.Position.Y, model.BodyPosition.Position.Z)
wait(0.01)
end
for i=1, 24, 1 do
model.BodyPosition.Position = Vector3.new(model.BodyPosition.Position.X - 0.5,
model.BodyPosition.Position.Y, model.BodyPosition.Position.Z)
wait(0.01)
end
end
It's in a local script.

3 comments
Honestly it would be easier if you tweened the part than set its position linearly.
But again you would need the player to move with it oof
Would bodyposition work tho