#double jump effects not working

3 messages · Page 1 of 1 (latest)

misty dirge
#

i was tryna make double jump effects (i do already have double jump working) but the effects aren't working for some reason here is my script

local UIS = game:GetService("UserInputService")
local KeyCode = Enum.KeyCode.Space
local player = game.Players.LocalPlayer
local a7a = 1
local humanoid = script.parent:WaitForChild("Humanoid")
local counter = 0
local effect = game.Workspace["effects i think"]
local humanoidpostion = script.Parent:WaitForChild("HumanoidRootPart")
local humanoidposition2 = humanoidpostion

UIS.InputBegan:Connect(function(Input)
    if counter == 0 then
    if Input.KeyCode == Enum.KeyCode.Space then
        if humanoid.FloorMaterial == Enum.Material.Air then
                script.Parent.HumanoidRootPart.Velocity += script.Parent.HumanoidRootPart.CFrame.UpVector * 60
                if counter == 0 then
                    a7a = 0
                    counter += 1
                end
            end
        end
    end
end)

UIS.InputBegan:Connect(function(Input)
    if counter == 0 then
        if Input.KeyCode == Enum.KeyCode.Space then
            if humanoid.FloorMaterial == Enum.Material.Air then
                effect.Position = Vector3.new("humanoidposition2")
            end
        end
    end
end)

humanoid:GetPropertyChangedSignal("FloorMaterial"):Connect(function(old, new)
    if new ~= Enum.Material.Air then
        counter = 0
    end
end)
zealous cypress
#

Vector3.new(humanoidposition2.Position)

misty dirge
#

fixed it a long ago btw thx