|
| 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
|
  |
| 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 |
|
|
|
| 28 Nov 2014 05:45 PM |
| Lighting is deprecated for storage. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 31 Dec 2014 06:13 AM |
| I SMELL OP FORT FOR DEFENDERS |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|