Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

can some tell me why this won't run in sb?

local Player = game.Players.LocalPlayer
local Character = game.Workspace:WaitForChild(Player.Name)
local Torso = Character:WaitForChild("Torso")
local LArm = Character:WaitForChild("Left Arm")
local RArm = Character:WaitForChild("Right Arm")

local Weld = Instance.new("Weld",LArm)
Weld.Part0 = LArm
Weld.Part1 = Torso
Weld.C0 = CFrame.new(1.5,0,0)

local Target = Weld.C0 * CFrame.new(0,1,0) * CFrame.Angles(0,0,math.rad(45))

local Speed = 0.4
wait(3)

game:GetService("RunService").RenderStep­ped:connect(function()
Weld.C0 = Weld.C0:lerp(Target,Speed) 
end)

2 comments

0

What are you asking?

0

^

1 answer

✓ Accepted answer

You need to remove the current Shoulder motor otherwise your new Weld won't affect the arm. Like this:

local Player = game.Players.LocalPlayer
local Character = game.Workspace:WaitForChild(Player.Name)
local Torso = Character:WaitForChild("Torso")
local LArm = Character:WaitForChild("Left Arm")
local RArm = Character:WaitForChild("Right Arm")

Torso:WaitForChild("Left Shoulder"):Destroy()

local Weld = Instance.new("Weld",LArm)
Weld.Part0 = LArm
Weld.Part1 = Torso
Weld.C0 = CFrame.new(1.5,0,0)

local Target = Weld.C0 * CFrame.new(0,1,0) * CFrame.Angles(0,0,math.rad(45))

local Speed = 0.4
wait(3)

game:GetService("RunService").RenderStepped:connect(function()
Weld.C0 = Weld.C0:lerp(Target,Speed) 
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.