Pull Up Animation Height Problem

I am trying to make a pull-up animation, but if you are taller you will go above the bar, and if you are shorted under the bar. I tried to make everyone the same height, but it didn’t work and I am now trying a better way without having to make every player the same height.

script.Parent.ProximityPrompt.Triggered:Connect(function(plr)
    local stopped = false
	
	local character = plr.Character
	local humanoid = character:FindFirstChild("Humanoid")
	
	plr.Character:PivotTo(script.Parent.Parent.TpPart.CFrame)
	script.Parent.ProximityPrompt.Enabled = false
	local animation = Instance.new("Animation")
	animation.AnimationId = "http://www.roblox.com/asset/?id=16257919280"

	
	humanoid.WalkSpeed = 0
	humanoid.JumpPower = 0

	local animationTrack = humanoid:LoadAnimation(animation)
	animationTrack:Play()
	animationTrack.Stopped:Connect(function()
	
			plr.leaderstats.Strength.Value = plr.leaderstats.Strength.Value + 4
			plr.PlayerGui.StrengthNotifGui.Enabled = true
			plr.PlayerGui.StrengthNotifGui.StrengthNotif.TextLabel.Text = "+4 Strength"

            wait(1)
		    plr.PlayerGui.StrengthNotifGui.Enabled = false

			script.Parent.ProximityPrompt.Enabled = true
			humanoid.WalkSpeed = 16
			humanoid.JumpPower = 50
	
	end)

	
end)
1 Like