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 » Scripters
Home Search
 

Re: Help with walkspeed

Previous Thread :: Next Thread 
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
28 Nov 2014 05:42 PM
The walkspeed change will not work, I have a feeling I'm doing something wrong! Any suggestions?

local groupId = 1016080 -- INSERT GROUP ID
local tool = game.Lighting["Sta-52"] -- CHANGE TO NAME OF WEAPON
local t00l = game.Lighting.Sword -- CANGE TO NAME OF WEAPON

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function()
onPlayerSpawned(player)
end)
end)

function onPlayerSpawned(player)
if player:GetRankInGroup(groupId) == 9 or 10 or 11 or 12 or 13 then -- INSERT RANK IDs
tool:Clone().Parent = player.Backpack
player.Humanoid.Walkspeed = 100
else if player:GetRankInGroup(groupId) == 3 or 4 or 5 or 6 or 7 then -- INSERT SAME RANK IDs
t00l:Clone().Parent = player.Backpack
player.Humanoid.Walkspeed = 1
end
end
end
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
28 Nov 2014 05:44 PM
You're using a free model, that's what you're doing wrong.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
28 Nov 2014 05:45 PM
Lighting is deprecated for storage.
Report Abuse
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
28 Nov 2014 06:04 PM
Yes, edited free models is what I'm doing. I can't script - I take them and edit them, and ask for help where required.

Anyway, back to the point.
I think it's because in 'player.Humanoid', the "player" is not defined?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
28 Nov 2014 06:06 PM
"player:GetRankInGroup(groupId) == 9 or 10 or 11 or 12 or 13"

At often times, I wish that would work.

But no.

You need to do
local Rank = player:GetRankInGroup(groupId)
if Rank == 9 or Rank == 10 or Rank == 11 then

Of course, the better method is
if Rank >= 9 and Rank <= 13 then
Report Abuse
SadisticNub is not online. SadisticNub
Joined: 05 Jan 2013
Total Posts: 4948
28 Nov 2014 06:46 PM

local groupId = 1016080 -- INSERT GROUP ID
local tool = game.Lighting["Sta-52"] -- CHANGE TO NAME OF WEAPON
local t00l = game.Lighting.Sword -- CANGE TO NAME OF WEAPON

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function()
onPlayerSpawned(player)
end)
end)

function onPlayerSpawned(player)
local Rank=player:GetRankInGroup(groupId)
if Rank>=9 and Rank <=13 then
tool:Clone().Parent = player.Backpack
player.Character:FindFirstChild("Humanoid").WalkSpeed = 100
elseif Rank>=3 and Rank <=7 then
t00l:Clone().Parent = player.Backpack
player.Character.Humanoid.WalkSpeed = 1
end
end
end
Report Abuse
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
31 Dec 2014 06:06 AM
Thanks.
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
31 Dec 2014 06:13 AM
I SMELL OP FORT FOR DEFENDERS
Report Abuse
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
31 Dec 2014 06:29 AM
No - the walkspeed values are for testing purposes for now, and this is all for the raider team, the defenders get the same system.

It all follows with the lore of the group. I can link a forum post to it, if you want?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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