Humanoid Jump event isn't working properly

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I want to destroy the weld as soon as the player has jumped.

  2. What is the issue? Sometimes the weld gets destroyed, other times it doesnt. I think this is due to the jump event not firing sometimes which I found through print debugging. But it doesn’t make sense why sometimes it works and sometimes it doesn’t.

  3. What solutions have you tried so far? I tried destroying the weld outside of the proxprompt with a humanoid.Jump event inside a characteradded event (server-side) and that didn’t help. destroyed the weld on the client and it worked however I don’t think this is the best idea especially if there is an alternative. I know that the client reacts faster but c’mon now server-side jump event shouldn’t mean that the event will run sometimes and sometimes not. I also tried using the statechanged event (server-side) but that didn’t help either.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- Server side script
local Car = workspace.Car
local SeatPart = workspace.SeatPart
local Prompt = Car.ProximityPrompt

Prompt.Triggered:Connect(function(Player)
	local Character = Player.Character
	local Humanoid = Character:FindFirstChildOfClass("Humanoid")
	local Weld = Instance.new("Weld", SeatPart)
	Weld.Part0 = SeatPart
	Weld.Part1 = Character:FindFirstChild("HumanoidRootPart")
	Weld.C0 = CFrame.new(0,2,0)
	Humanoid.Sit = true
	Humanoid.Jumping:Connect(function() -- This event sometimes fires, sometimes doesn't
		Character:FindFirstChild("HumanoidRootPart").CFrame = SeatPart.CFrame * CFrame.new(-4,0,0)
		Weld:Destroy()
	end)
end)

I guess I could try some sort of retry logic but idk if that’s the best way.

Probably need to just do a UserInputService for spacebar on the client and have the onserverevent listening for the space bar hit inside the proxprompt to destroy. That would guarantee it at least.

But that wouldn’t explain why the humanoid.Jump event is not working sometimes… Why?

Ok quick update I fixed the issue by using a seat:GetPropertyChangedSignal occupant event.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.