I’m doing a weightlifting system, but one side of the bar keeps going up crookedly, can anyone help me?
script.Parent.Triggered:Connect(function(Player)
if not HasPessoa then
HasPessoa = true
script.Parent.Enabled = false
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Humanoid = Character:WaitForChild("Humanoid")
local Settings = Character:WaitForChild("Settings")
local CanRun = Settings:WaitForChild("CanRun")
local CanWeapon = Settings:WaitForChild("CanWeapon")
CanRun.Value = false
CanWeapon.Value = false
Humanoid.WalkSpeed = 0
HumanoidRootPart.CFrame = script.Parent.Parent.Parent.TPPart.CFrame * CFrame.Angles(0,math.rad(-90),0) * CFrame.new(0,4,0)
local Anim = Humanoid:LoadAnimation(script.Animation)
Anim:Play()
local NewBarrinha = Barra:Clone()
NewBarrinha.Parent = workspace
NewBarrinha:SetPrimaryPartCFrame(Character.Head.CFrame*CFrame.new(0.5,-2.8,0)*CFrame.Angles(0,0,math.rad(10)))
local Weld = Instance.new("WeldConstraint")
Weld.Part0 = Character["RightHand"]
Weld.Part1 = NewBarrinha.PrimaryPart
Weld.Parent = NewBarrinha
coroutine.wrap(function()
for i,v in next,(Barrinha:GetChildren()) do
v.Transparency = 1
end
end)()
coroutine.wrap(function()
while true do
wait()
if Humanoid.Jump == true then
NewBarrinha:Destroy()
Weld:Destroy()
CanRun.Value = true
CanWeapon.Value = true
Humanoid.PlatformStand = false
Humanoid.WalkSpeed = game.StarterPlayer.CharacterWalkSpeed
coroutine.wrap(function()
for i,v in next,(Barrinha:GetChildren()) do
v.Transparency = 0
end
end)()
Anim:Stop()
HasPessoa = false
script.Parent.Enabled = true
break
end
end
end)()
wait(1)
Humanoid.PlatformStand = true
end
end)
Video - Roblox Studio (gyazo.com)](https://gyazo.com/6b812e900774109d644b168de896e2f9)