hey there, I’m trying to make a script when the player jumps, there jump height increases by one, but It doesn’t work, and there aren’t any errors,
Code
local UserInputService = game:GetService("UserInputService")
-- Shift keys
local Space = Enum.KeyCode.Space
-- Return whether left or right shift keys are down
local function IsSpaceDown()
return UserInputService:IsKeyDown(Space)
end
-- Handle user input began differently depending on whether a shift key is pressed
local function Input(input, gameProcessedEvent)
if not IsSpaceDown() then
-- Normal input
else
local player = game.Players.LocalPlayer
local humanoid = game.Workspace[player].humanoid
humanoid.JumpHeight.Value = humanoid.JumpHeight.Value + 1
end
end
UserInputService.InputBegan:Connect(Input)
I just get 16:23:35.405 - Players.twichman123.PlayerScripts.LocalScript:17: bad argument #2 (string expected, got Object)