Hey, I've created a script to rotate a csg object but when a user goes slightly under it, or by chance touches it in a certain position, it raises above the user's head.
What I'm asking is, how do i make the brick rotate without it going upwards when a player is underneath.
Here is the short script:
while true do
wait()
script.Parent.Rotation = script.Parent.Rotation + Vector3.new(1.2, 0, 1.2)
end

3 comments
Not an answer but, you should add a :Wait() in there else the script will just break.
You need to show the script that controls the model's movement. I suspect it's using :MoveTo (though I don't know how it's rotating with that), since using :SetPrimaryPartCFrame does not exhibit the behaviour you described.
@chess123mate no, this is the whole script. I'm not moving the object anywhere, only rotating it. @mosskil23 there is a wait, right after the line saying 'while true do'