local p1 = workspace.Rotationtest for i = 0,1000000000, .1 do local cf = p1:GetModelCFrame() cfLerp = cf:lerp(cf*CFrame.Angles(0,1,0),.05) game.Workspace.OrderItemR:SetPrimaryPartCFrame(cfLerp) game.Workspace.OrderItemR:MoveTo(Vector3.new((script.Parent.Primary.Position.X),(script.Parent.Primary.Position.Y),(script.Parent.Primary.Position.Z))) wait(.01) end
The code above is designed to make item drops rotate slowly while the player walks around them. While it does exactly what it's supposed to do in isolation, whenever I walk into the space the model is occupying in testing, the model floats up into the air, and stays there, because the script is constantly reading the new Y value each time it loops. I'm not sure what to add to the code to prevent the model from being suspended into the air, nor do I know what to add to prevent the script from moving them up in the first place. Is there any way to fix this?