How do I make something like the video below.
The video:
Any help is appreciated, thanks.
How do I make something like the video below.
The video:
Any help is appreciated, thanks.
I can’t tell what you mean. The video is too laggy.
As you can see in the video, the player holds a cd, then you move forward and jump to midair, then you’ll move fast, but when you’re not in midair, you’ll move normal, that’s what I mean.
I can’t see anything because the video is recorded in literally 1 fps.
My video may look a lot laggy, but what I mean is recreating like the one above.
What???
I’m sorry this video is just way too laggy for anyone to help. You’re gonna need to record at a higher FPS. Nobody can tell what’s going on.
They explained it above but I can’t understand it.
Nor can I…
This text will be hidden
So if the player is holding a cd and is in mid air then the player will be fast, otherwise the player will be normal speed
To do that you can add a local script to the character which keeps track of if the player has a cd equipped by using ChildAdded and ChildRemoved events and if the player is in mid air using Humanoid.StateChanged event or raycasts (using Humanoid.StateChanged is easier but using raycasts can allow extra functionality such as how high does the player have to be above ground in order for the effects to be applied) and in case the player has a cd equipped and is in mid air at the same time then make the player fast
Here’s the code for that
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local CDEquipped = false
local InMidAir = false
local NormalSpeed = 16
local CDSpeed = 32
local function UpdateSpeed()
if CDEquipped and InMidAir then
Humanoid.WalkSpeed = CDSpeed
else
Humanoid.WalkSpeed = NormalSpeed
end
end
Character.ChildAdded:Connect(function(Child)
if Child:IsA("Tool") and Child.Name == "CD" then
CDEquipped = true
UpdateSpeed()
end
end)
Character.ChildRemoved:Connect(function(Child)
if Child:IsA("Tool") then
CDEquipped = false
UpdateSpeed()
end
end)
Humanoid.StateChanged:Connect(function(_, State)
if State == Enum.HumanoidStateType.Freefall then
InMidAir = true
else
InMidAir = false
end
UpdateSpeed()
end)