How To Make Rapid Speed up Buttons: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Derthmonuter
No edit summary
>Mindraker
cleanup
Line 1: Line 1:
== What you Require ==
__TOC__
==Introduction==


Knowledge of how to make a button and how to use Studio.
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|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.


== What is WalkSpeed? ==
== Script ==


WalkSpeed is basically what it sounds like, the speed at which your character walks. For example, go into solo mode in the 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 you go, the faster. Negative Values cause your cotrols to reverse.
<pre>
 
function onTouched(part)
 
    if part.Parent ~= nil then
== Button Time ==
    local h = part.Parent:findFirstChild("Humanoid")
 
          if h~=nil then
Ok, I'm going to give you the script, then we'll go through it together.
          h.WalkSpeed = 80 -- go five times faster than default speed.
 
          end
  function onTouched(part)
    end
                  if part.Parent ~= nil then
end
                                local h = part.Parent:findFirstChild("Humanoid")
script.Parent.Touched:connect(onTouched)  
if h~=nil then
</pre>
h.WalkSpeed = 80
 
 
end
end
end
 
script.Parent.Touched:connect(onTouched)  
 
Ok, so basically this is a standard button script that checks if a player is really touching the button. We define the variable "h" as whoever happens to be touching the button's humanoid. Right there in the middle is the stuff we want, the
 
  h.WalkSpeed = 80
 
Well, this is 5 times more than 16, the default speed, so this makes your character 5 times faster.
 
== The End ==
 
Well, have fun with your buttons.
 
Oh and a note to any maderators reading this, please clean this up for me, I'm new. BUT YOU BETTER NOT TAKE CREDIT AWAY FROM ME! All I ask is that you include my name at the bottom like this,
 
                    -- Derthmonuter --

Revision as of 00:18, 3 September 2008

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)