You could use the animations, they're free to make. If you still don't get it, then there are Moter6Ds in the player's character. If you want to move the right arm a few studs forward then:
Like most joints, joints have C0 and C1. These mean CFrame0 and CFrame1 for part0 and part1. We need to move C1 3 studs forward, we can use lookVector so we know where is forward for the player.
#CFrame
Is like Vector3 but it's more complicated, you can change angles and there is lookVector and many other thing that aren't useable with Vector3. Here are the features we will be using with CFrame:
##lookVector
Will determine where the part's front face is facing.
print(workspace.Part.CFrame.lookVector)
##Angles
Angles are useful and with CFrame.Angles you can change the CFrame of the Part AND Rotate it!
workspace.Part.CFrame = CFrame.new(0,10,4) * CFrame.Angles(0,math.rad(45), math.rad(5))
Now you have to use math.rad() when changing the Angles to something, BUT you don't have to do that if you do something like this:
workspace.Part.CFrame = CFrame.new(0,10,4) * CFrame.Angles(0, 141.371669/pi, 15.7079633/pi)
I think it's like that. You don't need to do the pi way but make sure you use math.rad(). If it isn't right, I didn't learn this in school yet!
#UserInputService
UserInputService is a service that seeks for any sign of input(clicking, scrolling, typing)
local uis = game:GetService("UserInputService")
uis.InputBegan:connect(function(input, chat)
if input.KeyCode == Enum.KeyCode.E and not chat then
end
end)
#Final Product
local uis = game:GetService("UserInputService")
local plyr = game:GetService("Players").LocalPlayer
plyr.CharacterAdded:connect(function(char)
local t = char:WaitForChild("Torso")
local motor = char:WaitForChild("Right Shoulder")
uis.InputBegan:connect(function(input, chat)
if input.KeyCode == Enum.KeyCode.E and not chat then
motor.C1 = motor.C1+motor.C1.lookVector*3
end
end)
end)
Hope it helps!
1 comment
I believe you can use a Tool to get the body parts to pose.