Ad
Log in to vote
0

How do you rotate a part, is my script incorrect in some way?

Asked by 9 days ago

I'm trying to rotate a part in a model 90", how would I go about doing this?

I'm trying to use this script right now, but it's not working:

function onClicked()
game.Workspace.SeatFC_.BedFC.SeatFC__.Orientation = 90, 0, 0

What am I doing wrong?

Hi.

Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.

.

..

...

Now back to your regularly scheduled Scripting Helpers....

...

..

.

2 answers

Log in to vote
0
Answered by 9 days ago

You need to call the function so you would do this

script.Parent.MouseButton1Click:connect(function)
    game.Workspace.SeatFC_.BedFC.SeatFC__.Orientation = 90, 0, 0
end

If this helped you, dont forget to accept it as the answer.

0
I forgot to add the end to the end when I typed it in on the forum. xPhysicsFire -7 — 9d
0
This is my full script: function onClicked() game.Workspace.SeatFC_.BedFC.Union1.Transparency = 0 game.Workspace.SeatFC_.BedFC.Union2.Transparency = 0 game.Workspace.SeatFC_.BedFC.Union3.Transparency = 0 game.Workspace.SeatFC_.BedFC.Union4.Transparency = 0 game.Workspace.SeatFC_.BedFC.SeatFC__.Configuration["Arms Angle"].Value = -90 game.Workspace.SeatFC_.BedFC.SeatFC__.Configuration["Head xPhysicsFire -7 — 9d
0
Yeah, dont juse do functionOnClicked(), do script.Parent.MouseButton1Click:connect(function) KennySfromTitan 111 — 9d
Ad
Log in to vote
0
Answered by 9 days ago
Edited 9 days ago

You need a CFrame value. Like this.

workspace.Part.CFrame =  CFrame.Angles(90, 0, 0)

Sorry I can't explain much because I'm on a phone.

0
Responding to you and Kenny, adding the MouseButton1Click made my button no longer work, and the vector3 didn't fix anything. Are there any other issues..? xPhysicsFire -7 — 9d
0
Maybe try my edit. hiimgoodpack 660 — 9d
0
Do you have discord, so we can troubleshoot this over dm? xPhysicsFire -7 — 9d
0
no hiimgoodpack 660 — 8d

Answer this question



Ad