How do I make this straight? EDIT: its a mesh

I trying to make so it rotates sideways, but when I put the script in it goes all wonky like.

I can’t seem to find anything to help me fix it.

Here is a screenshot:

1 Like

Set the orientation to 0, 0, 0.

Also, what’s your script?

You could try adding a new very very small part, and put it in it (while it’s not visible to the eye), and selete it and the model, and union them together :happy3:

local part = script.Parent -- the part
local partspeed = 0.10 -- speed of the spin

while task.wait() do

	part.CFrame = part.CFrame * CFrame.Angles(partspeed,0,0) -- the spin of the part

end

If it is a model put an invis part with 0,0,0 orientation and set the part as the models PrimaryPart

I can’t because it’s a mesh. Any other ideas?

It’s not a model, it’s a mesh.

Do you have anthing thats a child of the script? Because assuming your mesh’s 0, 0, 0 Orientation is flat this shouldn’t happen when adding just script to it


This is the 0, 0, 0 orientation

You could also do Edit Pivot, where you could straighten it there. I posted about this before and I hope this can be your solution :slight_smile:

Your mesh’s 0, 0, 0 Orientation is not straight on the Y (Green) axis. Put a normal part with 0, 0, 0 Orientaion and see if the mesh lines up with it. If it does not then your mesh is not straight

It doesn’t line up. aaaaaaaaaa

I don’t know what Edit Pivot is, as I’m new to developing

then your mesh is messed up. Change in the rotation in blender or something but atleast its not the scripts fault :]

Go into Model, It should be right there and press edit pivot, where you can reposition the box around the mesh.

1 Like

Odd, I tried your script on a mesh but changed it to the y axis and it works. I used a mesh and no problems, is this what you are trying to do but with a gear?

1 Like

You could create a part and make the part wraps the model. And then make part invisible and group them, make the part group’s primary part and lastly, attach model to the part. Or you can make another and clean model, lol. It’s because the bad modelling workflow.

1 Like

Is this the mesh ID of that gear in the picture?
rbxassetid://6521831815

You want to make this spin?
why not use Hinge and motor? so you can also place the motor or idk just the way that thing was
maybe like rotate the motor just the this thing looks like and then connect them, maybe the part did not spin right, but the Gear looks right if you use this way