Player not getting boost

Everything i this script works but for some reason the player won’t get boosted up when i use assembly linear velocity?

–heres the script


local RunningPlayers = {}
local AnimModule = require(script.Parent.LoadAnim)

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local humanoid = char:WaitForChild("Humanoid")
		humanoid.Running:Connect(function(speed)
			if speed > 0 then -- Ensure the player is actually running
				if RunningPlayers[plr.UserId] then return end
				RunningPlayers[plr.UserId] = true

				local humRoot = char:WaitForChild("HumanoidRootPart")
				local module = require(script.Parent.ParkourCheck)
				local value, face = module.CheckPart(game.Workspace.Part, humRoot)

				if value == true then
					plr.PlayerGui.ClimbPrompt.Enabled = true
				end

				if value == true and RunningPlayers[plr.UserId] == true then
					local jumpForce = math.sqrt(2 * workspace.Gravity * game.Workspace.Part.Size.Y)
					print("Player is in the area")
					plr.PlayerGui.ClimbPrompt.Enabled = true
					print(jumpForce)
					humRoot.AssemblyLinearVelocity = Vector3.new(0, jumpForce, 0)
				else
					print("Player is not in the area")
					print(face)
					plr.PlayerGui.ClimbPrompt.Enabled = false
				end

				-- Reset debounce after the logic completes
				task.delay(1, function () RunningPlayers[plr.UserId] = false end)
			end
		end)
	end)
end)

although this seperate script works perfectly fine for some reason?


local jumpForce = math.sqrt(2 * workspace.Gravity * game.Workspace.Part.Size.Y)

game.Players.PlayerAdded:Connect(function (plr)
	plr.CharacterAdded:Connect(function (char)
		local humRoot = char:FindFirstChild("HumanoidRootPart")
		if humRoot then
			humRoot.AssemblyLinearVelocity = Vector3.new(0, jumpForce, 0)
			
		end
	end)
end)
1 Like

so i tried printing the players Assembly Linear Velocity and it shows that it gave the boost but nothing happens.

that’s because server doesnt own character phyiscs, consider using NetworkOwner or doing this on client.

1 Like