Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to rotate a seat with player sitting?

Asked by 5 years ago

Hello all, thanks for the help! I was wondering if it was possible to rotate a seat so the player tilts backward when he/she clicks a button (for a chair that leans back). Is rotating the seat the best way to achieve this -- I think the seat weld may break / not change the rotation of player, or is there a better way that I am unaware of? Thanks.

1
The weld shouldn't break if you rotate the seat using CFrame Amiaa16 3227 — 5y

1 answer

Log in to vote
3
Answered by 5 years ago
Edited 5 years ago

The best way to do this is to use an AngularVelocity. Learn more about them here: https://wiki.roblox.com/index.php?title=API:Class/BodyAngularVelocity

Edit: I did not think CFrame would work since for me once it did not stay, however Kriot22 is correct if you rotate using CFrame it will stay. An example script of rotating with CFrame:

while wait() do
    script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0,10,0)
end
0
So you would rotate the seat with that or the player? JackOfAllBlox 32 — 5y
0
The seat TiredMelon 405 — 5y
Ad

Answer this question