generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

What's wrond with this script?

Previous Thread :: Next Thread 
thetacah is not online. thetacah
Joined: 18 Jan 2013
Total Posts: 16026
18 Jan 2014 07:46 AM
It works, however when I unequipe and re-equippe, it takes my walkspeed SUPER slow!
Report Abuse
thetacah is not online. thetacah
Joined: 18 Jan 2013
Total Posts: 16026
18 Jan 2014 07:47 AM
Script is
local player = game.Players.LocalPlayer
function onequipped()
if player.Character.Humanoid.WalkSpeed >= 16 then
player.Character.Humanoid.WalkSpeed = 100
for i = 1, 20 do
wait(1)
player.Character.Humanoid.WalkSpeed = player.Character.Humanoid.WalkSpeed -1
if player.Character.Humanoid.WalkSpeed >= 16 then
player.Character.Humanoid.WalkSpeed = 100
end
end
end
end
script.Parent.Parent.Equipped:connect(onequipped)


function notequpped()
player.Character.Humanoid.WalkSpeed = 16



end
script.Parent.Parent.Unequipped:connect(notequpped)
Report Abuse
NiceCoder is not online. NiceCoder
Joined: 15 Oct 2012
Total Posts: 6593
18 Jan 2014 07:48 AM
"player.Character.Humanoid.WalkSpeed = player.Character.Humanoid.WalkSpeed -1"
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
18 Jan 2014 07:53 AM
Why >=, why not just == or <=
Report Abuse
thetacah is not online. thetacah
Joined: 18 Jan 2013
Total Posts: 16026
18 Jan 2014 08:17 AM
Because what I wrote is alot more efficient, obviously.
Report Abuse
thetacah is not online. thetacah
Joined: 18 Jan 2013
Total Posts: 16026
18 Jan 2014 08:26 AM
Help.
Report Abuse
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
18 Jan 2014 08:36 AM
you got ur answer...
Report Abuse
thetacah is not online. thetacah
Joined: 18 Jan 2013
Total Posts: 16026
18 Jan 2014 09:06 AM
What answer is that exactly?

Report Abuse
bloppers912 is not online. bloppers912
Joined: 11 Mar 2012
Total Posts: 6932
18 Jan 2014 09:07 AM
[ Content Deleted ]
Report Abuse
bloppers912 is not online. bloppers912
Joined: 11 Mar 2012
Total Posts: 6932
18 Jan 2014 09:07 AM
[ Content Deleted ]
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
18 Jan 2014 09:08 AM
if player.Character.Humanoid.WalkSpeed >= 16 then
player.Character.Humanoid.WalkSpeed = 100

His WalkSpeed will always be 100 because 100 > 16. That's why I told you, do you REALLY have to use >=
Report Abuse
thetacah is not online. thetacah
Joined: 18 Jan 2013
Total Posts: 16026
18 Jan 2014 03:18 PM
It becomes slower is what the issue is though.

Follow me on twitter: https://twitter.com/thetacah
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image