Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i make a part "update" to a new BodyPosition?

I have a script that changes a parts bodyposition.Position, but the part isn't moving to the new position. With that, the part starts working if you move it/"Update" it with the move tool while playing in the editor.

Here's the script in case it's the problem:

brick = script.Parent --find brick
startposition= brick.Position
bpos = brick:WaitForChild("BodyPosition") --find bodyposition
bpos.Position = brick.Position --set position automatically

startpos = brick.Position --set start position

Instance.new("BodyGyro",brick)

script.Parent.Anchored = false

--movement
while wait(brick.time.Value) do
	bpos.Position = startposition+ brick.direction.Value
	wait(brick.time.Value)
	bpos.Position = startpos --return to start
end

Here's the part and its' components: https://i.ibb.co/M5WPF5F/Capture.png

1 comment

0

Additionally, it was working until roblox recently updated. Now its not. :/

2 answers

Moving the part up and back to the original location magically fixed it. I really dont know why.

This discussion is preserved as it was. New answers, comments, and votes are closed.