How To Make Rapid Speed up Buttons

From Legacy Roblox Wiki
Revision as of 00:18, 3 September 2008 by >Mindraker (cleanup)
Jump to navigationJump to search

Introduction

WalkSpeed is what it sounds like, the speed at which your character walks. Go into solo mode in Roblox Studio and select yourself. If you look at your Humanoid, you will notice in the Properties panel a new value entitled "WalkSpeed" set to a default value of 16. The higher this value, the faster. Negative Values cause your controls to reverse.

Script

function onTouched(part)
     if part.Parent ~= nil then
     local h = part.Parent:findFirstChild("Humanoid")
          if h~=nil then
          h.WalkSpeed = 80 -- go five times faster than default speed.
          end			
     end
end
script.Parent.Touched:connect(onTouched)