Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Copied code from roblox guide and doesn't work?

Asked by 5 years ago
Edited 5 years ago

Just copied the code and everything from this guide https://developer.roblox.com/en-us/articles/Double-Jumping

It just doesnt work at all. I have no idea whats wrong, but literally nothing happens. im new to dev in roblox so some help would be nice. thanks

if it helps this is the code:

01local UserInputService = game:GetService("UserInputService")
02local localPlayer = game.Players.LocalPlayer
03local character
04local humanoid
05 
06local canDoubleJump = false
07local hasDoubleJumped = false
08local oldPower
09local TIME_BETWEEN_JUMPS = 0.2
10local DOUBLE_JUMP_POWER_MULTIPLIER = 2
11 
12function onJumpRequest()
13    if not character or not humanoid or not character:IsDescendantOf(workspace) or
14     humanoid:GetState() == Enum.HumanoidStateType.Dead then
15        return
View all 49 lines...
1
On the last line, you are missing the closing bracket after "(onJumpRequest" RoblotXRB 3 — 5y
0
Thanks! TomisOps1 0 — 5y

Answer this question