Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is this bodyposition script not working?

Asked by
EpicLilC 150
8 years ago
script.Parent.BodyPosition.position = Vector3.new(0, 20, 0)

This seems like a pretty easy script to do. All I want is for the platform that this script is in is to move to to the position (0,20,0), but for some reason it isn't working? I looked up a tutorial on how to make a moving platform and this worked perfectly, but for some reason it's not working now. All I heard was that the physics changed or something, but how would I make this work?

1 answer

Log in to vote
1
Answered by 8 years ago

Extremely simple fix.

script.Parent.BodyPosition.position = Vector3.new(0, 20, 0) The position property is lowercased

script.Parent.BodyPosition.Position = Vector3.new(0, 20, 0)

That should fix the syntax issues. If your platform isn't moving at all, check for Anchors.

If you have any further questions and/or issues, leave a comment or send me a Roblox PM!

~MBacon15


As a sidenote, if you referenced this video

https://www.youtube.com/watch?v=dqyJk0w2AY0

You may have anchored the moving platform. When I worked on my moving platforms, setting the Y value of MaxForce to something stupidly high prevented external vertical feedback (Players jumping) from affecting the platform.

Ad

Answer this question