So basically idk if this is a roblox bug or what but JumpRequest is firing when i press space while chatting…
Video:
Local Script:
local plr = game.Players.LocalPlayer
local Character = plr.Character or plr.CharacterAdded:Wait()
local UIS = game:GetService("UserInputService")
local Detained = plr:WaitForChild("ArrestSystem"):WaitForChild("Detained")
UIS.JumpRequest:Connect(function()
if Detained.Value == false then
if Character.Humanoid.FloorMaterial == Enum.Material.Air then return end
Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
else
Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
end
end)
i would appreciate if somebody could tell me if i’m doing smth wrong or if this is a roblox bug!
In most use cases with UserInputService, you have the gameProccessedEvent variable. That variable basically tells you if something else is binded to that key, where it would be true, and if nothing is currently being activated by the key, it is false.
Apparently, JumpRequest doesn’t have such a key. It doesn’t seem to me like a commonly used event. You would probably have to find an alternative such as Humanoid.Jumping, UserInputService or ContextActionService, though your use case seems quite specific.
ContextActionService:GetAllBoundActionInfo() could maybe be useful? Idk if it can tell you if the player is chatting or not
local plr = game.Players.LocalPlayer
local Character = plr.Character or plr.CharacterAdded:Wait()
local UIS = game:GetService("UserInputService")
local Detained = plr:WaitForChild("ArrestSystem"):WaitForChild("Detained")
local Chatting = false
UIS.JumpRequest:Connect(function()
if Detained.Value == false then
if Character.Humanoid.FloorMaterial == Enum.Material.Air then return end
if Chatting == true then return end
Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
else
Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
end
end)
UIS.InputBegan:Connect(function(input,gameProcessedEvent)
Chatting = gameProcessedEvent
end)