I’ve recently added custom characters to my game and for some reason I realised that the UserInputService:JumpRequest event doesn’t work anymore.
Here’s a little test I made:
Server Script
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Once(function(char)
task.wait(5)
local newChar = script.NewChar:Clone()
newChar.Parent = game.Workspace
plr.Character = newChar
end)
end)
Local Script
-- Services
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
-- Constants
local Plr = Players.LocalPlayer
-- Variables and Functions
local jumpEvent = nil
Plr.CharacterAdded:Connect(function(char)
if jumpEvent then
jumpEvent:Disconnect()
end
jumpEvent = UIS.JumpRequest:Connect(function()
print("jump request")
end)
end)
Once the character is changed by the server script, the JumpRequest event breaks completely.
If anyone has any idea to fix this please let me know!