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

How can I make a speed coil not change your speed back to 16 when you unequip it?

Asked by 3 years ago

I have a game with a vip game pass which gives you extra speed. I also have a game pass for a speed coil, but when I unequip the speed coil, my speed gets reset to 16, or whatever number I choose to put in the speed coil script for when the speed coil is unequipped. So how can I make it so that when I unequip the speed coil, my speed goes back to my original speed that I had before I equipped the speed coil so that it works for both people who have that initial extra speed from the vip game pass and people who don't own the game pass and have normal speed?

This is the part from the speed coil script for when it's unequipped:

while tool~=nil and tool.Parent==sp and h~=nil do
        sp.ChildRemoved:wait()
    end
    local h=sp:FindFirstChild("Humanoid")
    if h~=nil then
        h.WalkSpeed=originalwalkspeed
    end
end

1 answer

Log in to vote
0
Answered by 3 years ago

Permanent Speedcoil Script

First of All, Remove All Script on The Tool.

Then Make A Script, Copy this:

script.Parent.Equipped:Connect(function() --Detect if Tool Being Equipped
    wait(1)
    script.Parent.Parent:WaitForChild("Humanoid").WalkSpeed = 32 --Set Character Speed
end)

Place the Script inside the tool.

And You Done!

Feel Free to Comment If It Not Working!

Hope It Helps!

Ad

Answer this question