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
 

Re: Walkspeed script

Previous Thread :: Next Thread 
CheckWork is not online. CheckWork
Joined: 24 Jul 2012
Total Posts: 435
30 Jan 2013 03:18 PM
I'm making Temple Run game.
I need help making a walk speed script.
Can you please help?
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
30 Jan 2013 03:19 PM
player.Character.Humanoid.Walkspeed

~Apply to join my primary group if you can script~
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
30 Jan 2013 03:22 PM
^
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
30 Jan 2013 03:23 PM
^
^

Except the property is named WalkSpeed not Walkspeed. Lol.



- thedestroyer115
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
30 Jan 2013 03:25 PM
^ I don't know, I use "Walkspeed" and it works..

~Apply to join my primary group if you can script~
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
30 Jan 2013 03:26 PM
No, it doesn't. Unless ROBLOX changed the property WalkSpeed to Walkspeed, whoch thye didn't.

- thedestroyer115
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
30 Jan 2013 03:27 PM
Total fail at the end there:
, in which they didn't.

- thedestroyer115
Report Abuse
CarlosMX is not online. CarlosMX
Joined: 30 Apr 2011
Total Posts: 791
30 Jan 2013 03:29 PM
So you want the script in a gui? or??? Please explain more, and for future reference: Scripting Helpers isn't actually for writing free scripts for people, its about helping you fix your script that currently doesn't work.
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
30 Jan 2013 03:30 PM
Nevermind, you're right. I just looked into my game and I did use "WalkSpeed". I guess I don't even think about it when I'm typing it..
Report Abuse
CheckWork is not online. CheckWork
Joined: 24 Jul 2012
Total Posts: 435
31 Jan 2013 12:02 PM
Will I add how fast I want it to be on the end?

Like this

player.Character.Humanoid.Walkspeed=20
Report Abuse
alibix123 is not online. alibix123
Joined: 14 Nov 2009
Total Posts: 766
31 Jan 2013 12:03 PM
On player entered or for a specific player
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
31 Jan 2013 02:38 PM
Alright, so for this script, we are going to need to use 'onPlayerEntered'. Whenever a player enters a game, their walk speed will be changed to whatever you have specified in the script.

function onPlayerEntered(newPlayer) -- Function we will be using.
wait()
if newPlayer~=nil then -- Check if the player actually exist.
newPlayer.Character.Humanoid.WalkSpeed = 100 -- Changes their walk speed to 100.
end
end
game.Players.PlayerAdded:connect(onPlayerEntered) -- Connection Line.

Where it says 'Changes their walk speed to 100', you will change 100 to whatever you want their walk speed to change to.

Hope this helped a bit. Good luck.
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
31 Jan 2013 02:39 PM
"newPlayer.Character.Humanoid.WalkSpeed = 100"

You would change that '100' to whatever you want their walk speed to be, not sure if I made that clear enough.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
31 Jan 2013 02:52 PM
@Taco
Anonymous functions plz.


game.Players.PlayerAdded:connect(function(player)

player.CharacterAdded:connect(function(char)
char.Humanoid.WalkSpeed = 50
end)

player.Changed:connect(function(changed)
if changed == "Character" then
wait(6.5)
player.Character.Humanoid.WalkSpeed = 50
end end)
end)


- thedestroyer115
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
31 Jan 2013 03:01 PM
Eh, I guess. But seeing as he doesn't know how to script (or not really good) I didn't want to complicate it to much for him.

Still agree with you though, anonymous functions (Y).
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
31 Jan 2013 03:10 PM
Taco, don't try to help people if you can't script.

I can't script better than you.
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
31 Jan 2013 03:13 PM
The script I gave him works fine. I tested it myself and had no problems.

> I can't script better than you.

Not following.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
31 Jan 2013 03:13 PM
@Taco
Also, if you are using the .PlayerAdded event, why would you need to check if the player exists?

- thedestroyer115
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
31 Jan 2013 03:16 PM
That's simply how i've learned and what I've adjusted to using.

It may not be required, but when dealing with Players, I'm used to checking to see if they exist.

You may prefer otherwise, its personal preference.
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
31 Jan 2013 03:18 PM
Thats called a signature. And your script is uber inefficient.

function onPlayerEntered(newPlayer)
wait() -- .._. Thats just giving time for the player to leave.
if newPlayer~=nil then -- You already know theres a new player.. so why are you even doing this?
newPlayer.Character.Humanoid.WalkSpeed = 100
else -- use a else line to make sure since you added the wait
return false
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)

I can't script better than you.
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
31 Jan 2013 03:21 PM
> Thats called a signature.
My bad.

> And your script is uber inefficient.

I thought it up at the top of my head, I wasn't thinking purely on the topic, nor was I trying to create an "uber efficient script" that was perfectly coded.

I was only trying to explain what function he would want to use, and why. It was quickly written.
Report Abuse
crookedcool5 is not online. crookedcool5
Joined: 25 Sep 2010
Total Posts: 273
31 Jan 2013 03:23 PM
Taco why use newPlayer? WHy not replace with a variable. nP.
Report Abuse
crookedcool5 is not online. crookedcool5
Joined: 25 Sep 2010
Total Posts: 273
31 Jan 2013 03:25 PM
However taco i LOVE your method of scripting. I use ~=nil too. Even if it isnt required.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
31 Jan 2013 03:28 PM
I find that looks ugly..

- thedestroyer115
Report Abuse
TacoBowls is not online. TacoBowls
Joined: 02 Mar 2009
Total Posts: 112
31 Jan 2013 03:28 PM
As I already said earlier, considering the fact that he (most likely) isn't an advanced scripter, I was trying to keep everything simple.

If I had chosen to, I could have named it "derp" for all the matter. Also, I've said earlier, I'm not using this script. It was simply to explain how it works to the OP. If it were me, using it in one of my scripts, many things would have changed.

If he's a beginner, and all he wants is a walk speed change, why should I bother myself to complicate the entire script?

The purpose for this forum is mainly (I'd assume) for helping people with their scripts. In this situation, he hasn't provided an already-coded script for us to fix. This being so, it isn't required to just make a script for him to copy/paste, by doing so he wouldn't be learning much.

I realize that I haven't explained it to much, but then again, why should I have complicated it for him?

Oh well, everyone is entitled to their own opinion.
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