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

How to make a speed block?

Asked by 8 years ago

How would you make a block that once u touch increases your speed?

3 answers

Log in to vote
-1
Answered by 8 years ago

I'm not going to give you the answers straight out, but use the Touched event and Walkspeed in Humanoid.

Or you can just use this http://wiki.roblox.com/index.php?title=API:Class/Humanoid/WalkSpeed

If you can't figure that out, I suggest reading

http://wiki.roblox.com/index.php?title=Intro_to_Scripting

Ad
Log in to vote
0
Answered by 8 years ago

Place this inside the speed block

local function touched(hit)
    local humanoid = hit.Parent:findFirstChild("Humanoid")

    if humanoid ~= nil then
        humanoid.WalkSpeed = 50 --Change 50 to how fast you want the player to go
        print("Worked!")
    end
end

script.Parent.Touched:connect(touched)
0
Doesn't work how would I ensure it worked? ZackVIII 10 — 8y
0
my bad instead of "Parent", I put "Paent", I updated the script, it should work now :D thehybrid576 294 — 8y
Log in to vote
0
Answered by 8 years ago

So, first off, place down a part, put a script in that part, and put this script in.

p = script.Parent

function powerup()
    game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 1337 
end

p.Touched:connect(powerup)
0
This isn't working also. Any advice? ZackVIII 10 — 8y

Answer this question