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

How to make character's arms together like a straight jacket?

Asked by 4 years ago
Edited 4 years ago

local ting = 0 --debouncer function onTouched(hit) if ting == 0 then --debounce check ting = 1 --activate debounce local check = hit.Parent:FindFirstChild("Humanoid") --Find the human that touched the button if check ~= nil then --If a human is found, then local player = game.Players:GetPlayerFromCharacter(hit.Parent) --get player from touching human --Fix Arms local Torso = hit.Parent:FindFirstChild("Torso") local LA = hit.Parent:FindFirstChild("Left Arm") local RA = hit.Parent:FindFirstChild("Right Arm") local LShoulder = Torso:WaitForChild("Left Shoulder") local RShoulder = Torso:WaitForChild("Right Shoulder") end script.Parent.Touched:connect(onTouched)

Where it says --fix arms, I would like it to make a character's arms be into a position as a person in a straight jacket.

0
Use an animation MachoPiggies 526 — 4y
0
How? KingPanda679 0 — 4y
View all comments (2 more)
0
Can I use something like a CFrame? KingPanda679 0 — 4y
0
An animation would be the easiest way to do it. ResoluteAyres 6 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

using animations is easier but you could also use CFrame to do this. You need to edit the motor6d joints of the player(joints are different between r6 and r15). the joints are basically welds and you can edit them using weld offsets(C1 and C0). This takes some time to tweak to get it to the position you want.

for example

local rightshoulder -- define this as the motor6d joints in the player
local CFrame = CFrame.new() -- position of arms relative to where they normally are
local Angles = CFrame.Angles.new(math.rad(0),math.rad(0),math.rad(0)) -- rotate arms in degrees
rightshoulder.C1 = rightshoulder.C1 * CFrame * Angles
Ad

Answer this question