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
You should use CFrames.
Setting the position, rotation or size will take Collision into the math, wich will eventualy put it on top.
How to use CFrames:
while true do Part.CFrame = Part.CFrame * CFrame.Angles( --math.rad(float) converts radians to degrees. math.rad(DegreeYouWant), -- X Rotation in Radians 0, -- Y Rotation in Radians 0 -- Z Rotation in Radians ) wait() end