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: I'm trying to make a custom starterpack for each map loaded.

Previous Thread :: Next Thread 
CantFindTheInternet is not online. CantFindTheInternet
Joined: 06 Oct 2012
Total Posts: 5873
24 Jul 2014 05:22 PM
Does anyone have a previously made script that worked for them?
Report Abuse
CantFindTheInternet is not online. CantFindTheInternet
Joined: 06 Oct 2012
Total Posts: 5873
24 Jul 2014 05:25 PM
b
Report Abuse
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
24 Jul 2014 05:27 PM
u mean different weapons?
Report Abuse
CantFindTheInternet is not online. CantFindTheInternet
Joined: 06 Oct 2012
Total Posts: 5873
24 Jul 2014 05:30 PM
Yeah, like it will change weapons every time a new map is loaded.
Report Abuse
CantFindTheInternet is not online. CantFindTheInternet
Joined: 06 Oct 2012
Total Posts: 5873
24 Jul 2014 05:36 PM
anyone have any tips they could give me on how to make one myself at least..?
Report Abuse
dansk is not online. dansk
Joined: 24 Dec 2008
Total Posts: 548
24 Jul 2014 05:44 PM
Not really sure what your getting at but Ill assume you have a premade map script. Put some weapons in Replicated storage or something and use the :Clone() Command to put different weapons in your starter gear. To remove all weapons in the startergear for all players, do this:

Local players = game.Players:GetChildren()

For i = 1, #players do
Local gear = players[i].StarterGear:GetChildren()
For i = 1, #gear do
--if gear[i].ClassName=="Tool" or gear[i].ClassName=="Hopperbin" then -- optional
gear[i]:Destroy()
--end
end
end
Report Abuse
CantFindTheInternet is not online. CantFindTheInternet
Joined: 06 Oct 2012
Total Posts: 5873
24 Jul 2014 05:48 PM
like for every map loaded, i want new weapons
Report Abuse
dansk is not online. dansk
Joined: 24 Dec 2008
Total Posts: 548
24 Jul 2014 05:58 PM
Put weapons in some type of storage like lighting or replicated storage. Use the last post I did to clear players startergear(gear they start with) do

local player = game.Players:GetChildren()

For i = 1, #player do
local t = game.(wherever you placed your tool).Tool:clone()
T.Parent = player[i].StarterGear
End
End
Report Abuse
CantFindTheInternet is not online. CantFindTheInternet
Joined: 06 Oct 2012
Total Posts: 5873
24 Jul 2014 07:24 PM
what im trying to do is if i say ":Load Bricktops" is will give me RCL guns but if I say ":Load wARCBricktops" it will give me wARC guns

how do i do this
Report Abuse
CantFindTheInternet is not online. CantFindTheInternet
Joined: 06 Oct 2012
Total Posts: 5873
24 Jul 2014 07:52 PM
b
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 Jul 2014 07:52 PM
Probably make a Configuration object in each map named "StarterPack" and when that map loads, clone all from in there to each player's backpack or whatever
Report Abuse
CantFindTheInternet is not online. CantFindTheInternet
Joined: 06 Oct 2012
Total Posts: 5873
24 Jul 2014 08:07 PM
here is what i have

tplac = {"Backpack","StarterGear"}
for _,v in pairs(game.Players:GetPlayers()) do
removeTools(v)
for key,val in pairs(tools) do
if string.lower(key) == string.lower(CurrentSim) then
for _,tool in pairs(val) do
if game.Lighting:FindFirstChild(tool) then
local t = game.Lighting:FindFirstChild(tool)
for i = 1,#tplac do
t:Clone().Parent = v[tplac[i]]
wait()
end
end
end
end
end
end
end

function removeTools(Player)
for _,backpacktools in pairs(Player.Backpack:GetChildren()) do
backpacktools:Destroy()
end
for _,startertool in pairs(Player.StarterGear:GetChildren()) do
startertool:Destroy()
end
end
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