This is not a question but more of a fix for JumpRequest because it fires multiple times.


local input = game:GetService("UserInputService")

local request = 0

local Jump = function()
	if request == 0 and request < 1 then request = request + 1 else return nil end -- sets request to 1, otherwise return nil
	-- Jump Request Code 
end

local keyEnd = function(k, gp)
	if not gp then else return nil end -- making sure that the player is not typing in chat or interacting with Proximity Prompts
	if k.KeyCode == Enum.KeyCode.Space then
		request = 0 -- reset the request count to 1
	end
end

input.InputEnded:Connect(keyEnd)
input.JumpRequest:Connect(Jump)

this will force the code in the function to only run once

1 comment

0

As far as I'm aware, this is an Engine Bug. This was addressed in the DevForum: Engine Bugs 4 YEARS ago. I suggest you find a way to somehow manipulate this system / find an alternative