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: How to have my group spawn with tools and not anyone else?

Previous Thread :: Next Thread 
4macmr is not online. 4macmr
Joined: 11 Sep 2010
Total Posts: 62
27 May 2014 08:21 PM
So if my group were to join my game they will get a special tool, also can it be a specific rank that gets the tools?
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
27 May 2014 08:26 PM
game.Players.PlayerAdded:connect(function(p)
if p:GetRankInGroup(GroupId) > RankNumBeforeRankThatGetsTool
game.Lighting.SpecialToolName:Clone().Parent = p.Backpack
end
end)
Report Abuse
4macmr is not online. 4macmr
Joined: 11 Sep 2010
Total Posts: 62
27 May 2014 08:39 PM
Thanks
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
27 May 2014 08:41 PM
OVERPOWERED! NOT FAIR! NOOB!
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
27 May 2014 08:44 PM
No problem :D

@echo What..?
Report Abuse
4macmr is not online. 4macmr
Joined: 11 Sep 2010
Total Posts: 62
27 May 2014 08:46 PM
Hold up it didn't work.
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
27 May 2014 08:47 PM
@war: What reason would he have to use tools only for his group I wonder? Most likely guns that have twice the damage.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
27 May 2014 08:55 PM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
if p:GetRankInGroup(GroupId) > RankNumBeforeRankThatGetsTool then
repeat wait() until p.Backpack
game.Lighting.SpecialToolName:Clone().Parent = p.Backpack
end
end)
end)
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
27 May 2014 08:59 PM
-- If I didn't use this iPad, I would have moved that conditional under CharacterAdded.

SpecialToolName = "Change what is inside the quotes to the tool inside lighting"
RankNumBeforeRankThatGetsTool = 0 -- Change number to rank numbers above the number gets the tool.
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
if p:GetRankInGroup(GroupId) > RankNumBeforeRankThatGetsTool then
repeat wait() until p:FindFirstChild'Backpack'
game.Lighting[SpecialToolName]:Clone().Parent = p.Backpack
end
end)
end)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
27 May 2014 09:04 PM
Put all the gear you want the group to have in a model. Put the Model in Lighting. Name it 'Mdle'. Put the ID of your group at 'GroupID'. Put this script in Workspace.


c = game.Lighting:FindFirstChild("Mdle"):GetChildren()
groupID = 0000000

game.Players.PlayerAdded:connect(function(plr)
plr:WaitForDataReady()
if plr:IsInGroup(groupID) then
plr.CharacterAdded:connect(function(char)
for i = 1,#c do
c[i]:Clone().Parent = plr.Backpack
end end)
else return end end)
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
27 May 2014 09:13 PM
4mac did you change RankNumBeforeRankThatGetsTool to the correct rank num or did you not change it
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