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

How do I make a part with welds attached to it rotate?

I have this fish, and I have it to where swims it back and forth. But I want it to rotate every time it reaches the end of it's path. I have already tried five methods and this is the best one:


fp = script.Parent.Position
while true do
script.Parent.BodyPosition.position = Vector3.new(fp.x-80, fp.y, fp.z)
wait(6)
script.Parent.BodyPosition.position = Vector3.new(fp.x, fp.y, fp.z)
script.Parent.BodyGyro.cframe = CFrame.new(0,math.pi, 0)
wait(6)
script.Parent.BodyGyro.cframe = CFrame.new(0,math.pi, 0)
end

It doesn't rotate it however. The other methods result in the welded parts exploding all over the map, or the part just simply fall off of the moving object.

Much assistance would be greatly gratified.

1 answer

Okay I found out the issue: "CFrame.new" should be "CFrame.Angles"

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