local Bin = game.ReplicatedStorage.BindableFunction
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local lp = game.Players:FindFirstChild(“Humanoid”)
local Spawned = false
game:GetService("Players").PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(Char)
Spawned = true
old = lp.Character.Torso["Right Shoulder"].C1
old2 = lp.Character.Torso["Left Shoulder"].C1
end)
end)
mouse = game.Players.LocalPlayer:GetMouse()
Camera = game.Workspace.Camera
game:GetService('RunService').RenderStepped:connect(function()
if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Spawned and lp.Character and lp.Character.Humanoid.Health > 0 then
mouse.TargetFilter = nil
lp.Character.Torso["Right Shoulder"].C1 = old * CFrame.Angles(0, 0, math.tan((mouse.Hit.p - mouse.Origin.p).unit.y)*-1)
lp.Character.Torso["Left Shoulder"].C1 = old2 * CFrame.Angles(0, 0, math.tan((mouse.Hit.p - mouse.Origin.p).unit.y))
elseif lp.Character and lp.Character.Humanoid.Health > 0 and Spawned and lp.Character then -- this is line 121
lp.Character.Torso["Right Shoulder"].C1 = old
lp.Character.Torso["Left Shoulder"].C1 = old2
end
end)
local Bin = game.ReplicatedStorage.BindableFunction
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local lp = Character:FindFirstChild(“Humanoid”)
local Spawned = false
game:GetService("Players").PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(Char)
Spawned = true
old = lp.Parent.Torso["Right Shoulder"].C1
old2 = lp.Parent.Torso["Left Shoulder"].C1
end)
end)
mouse = game.Players.LocalPlayer:GetMouse()
Camera = game.Workspace.Camera
game:GetService('RunService').RenderStepped:connect(function()
if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Spawned and lp.Parent and lp.Health > 0 then
mouse.TargetFilter = nil
lp.Parent.Torso["Right Shoulder"].C1 = old * CFrame.Angles(0, 0, math.tan((mouse.Hit.p - mouse.Origin.p).unit.y)*-1)
lp.Parent.Torso["Left Shoulder"].C1 = old2 * CFrame.Angles(0, 0, math.tan((mouse.Hit.p - mouse.Origin.p).unit.y))
elseif lp.Parent and lp.Health > 0 and Spawned and lp.Parent then -- this is line 121
lp.Parent.Torso["Right Shoulder"].C1 = old
lp.Parent.Torso["Left Shoulder"].C1 = old2
end
end)
lp is the humanoid so you want to use lp.Parent.Torso to get the torso because lp.Character will always return nil (humanoid does not have a character property)