Ok I have a problem and I do not know how to solve it

So I have this inspect mechanic for my game and I need to set it up where I can rotate models but I do not know how to rotate models here’s a video on how the script works

So as you see in the video the problem with the script is I need to rotate the model but I do not know how to do this since the origin orientation property wont let me script it any Ideas how I can rotate the model and not just the part?

You can change the ViewportFrame.ImageTransparency property.

what do you mean image transparency can you explain what this would accomplish.

Sure!

ViewportFrames have a property called “ImageTransparency”. It works the same way as ImageLabel.Transparency. When changing the .ImageTransparency property of a ViewportFrame, it will change the object transparency.

This is probably my fault for not explaining the system well but the way it operates is it duplicates the mouse targets model and puts it in the viewport then I rotate it using orientation and mouse.X and mouse.Y but It only works with parts right now because I cant orientate models

this is not what im trying to accomplish i am trying to rotate the model that gets adden to the viewport I just have that parts transparency showing to show that it rotates the part but not the model

Rotating a model is currently possible. You can have a look at this post if you need help! :slight_smile:

Hmmm im not sure if I understand that as much it says to rotate the camera which I dont see how thatll work because this wont give me the desired effect because I need to rotate the model instead of having the camera orbit around the model how can I rotate the model like you were saying?

You’ll prob need to look at SetPrimaryPartCFrame and CFrame angles if they haven’t added an easier way to do this recently. Using that SetPrimaryPartCFrame method will allow you to move or rotate the whole model by setting the CFrame of the model’s PrimaryPart.

I am attempting this right now and it’s kinda working in buffing out bugs. ok I got this

target:SetPrimaryPartCFrame(CFrame.Angles(math.rad(mouse.Y), math.rad(0), math.rad(mouse.X / 5)))

but I do have one problem one of the models is like pivoted and rotates on like a pivot or something

here’s the video

It should use the center of whatever you have chosen as the PrimaryPart. They’ve updated how rotation works, adding pivots and such I think, but I haven’t had a chance to look at that. I think it’s scriptable and could pull default settings from something you have set in the editor. Could try placing a small cube at the point where you want it to rotate and set that to the PrimaryPart. If it’s small enough, it shouldn’t matter if a pivot is not centered on that part. Could try for testing anyway until you figure out what’s up with the weird rotation.

can try something like that anyway to see if the prob is with the pivot or your code.

Yes I Have seen these pivots I will experiment with them and there offset and all that thanks for the response