Hello everyone, I am trying to make a part rotate around itself and move up and down, all while the player sticks to it. Here is the result
Here is the part
This is the script I’m using for moving it up and down
local part = script.Parent
while true do
for i = 1, 100, 1 do
part.CFrame = CFrame.new(part.Position) + Vector3.new(0, 0.1, 0)
wait()
end
for i = 1, 100, 1 do
part.CFrame = CFrame.new(part.Position) + Vector3.new(0, -0.1, 0)
wait()
end
end
This is the script that is controlling the bodyPosition
local part = script.Parent
local bodyPosition = part.BodyPosition
local bodyAngularVelocity = part.BodyAngularVelocity
bodyPosition.Position = part.Position
bodyPosition.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyPosition.P = 10000000000000000000000
bodyPosition.D = 100000000000
bodyAngularVelocity.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
Thanks