#I am in need of help scripting a triple jump mechanic like in mario 64

1 messages · Page 1 of 1 (latest)

lucid scroll
#

-- Services
local UserInputService = game:GetService("UserInputService")
local player = game.Players.LocalPlayer

-- Variables
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")

local jumpCount = 0 -- Counts jumps since last landing
local maxJumps = 3 -- Maximum jumps allowed
local baseJumpPower = 50 -- Starting jump height
local jumpIncrement = 20 -- Additional height per subsequent jump
local currentJumpPower = baseJumpPower