badfitz99
|
  |
| Joined: 01 May 2010 |
| Total Posts: 5854 |
|
|
| 25 Apr 2014 11:15 AM |
But when I try this script
plrs = game.Players:GetPlayers weapons = pickedMap.Weapons:GetChildren()
for i = 1, #plrs do for x = 1, #weapons do ss = weapons[x]:clone() ss.Parent = plrs[i].Backpack end end
nothing happens. It doesn't break the script, it doesn't give them the weapons and keeps on going.
--The ed edd n eddy fanboy of ot-- Be polite, be professional, but have a plan to kill everybody you meet. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 11:20 AM |
plrs = game.Players:GetPlayers weapons = pickedMap.Weapons:GetChildren()
for i = 1, #plrs do print("Got plrs") for x = 1, #weapons do print("Got weapons") ss = weapons[x]:clone() print("Cloned weapons") ss.Parent = plrs[i].Backpack print("Players have weapons") end end
Put this in and run a server. Press F9 and tell me the output |
|
|
| Report Abuse |
|
|
badfitz99
|
  |
| Joined: 01 May 2010 |
| Total Posts: 5854 |
|
|
| 25 Apr 2014 11:26 AM |
It seem's that when the first map is loaded, it doesn't clone the weapons. But when it repeats the function and chooses another map, it clones the weapons
--The ed edd n eddy fanboy of ot-- Be polite, be professional, but have a plan to kill everybody you meet. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 11:30 AM |
plrs = game.Players:GetPlayers weapons = pickedMap.Weapons:GetChildren()
repeat wait() until Workspace.pickedMap for i = 1, #plrs do print("Got plrs") for x = 1, #weapons do print("Got weapons") ss = weapons[x]:clone() print("Cloned weapons") ss.Parent = plrs[i].Backpack print("Players have weapons") end end |
|
|
| Report Abuse |
|
|
badfitz99
|
  |
| Joined: 01 May 2010 |
| Total Posts: 5854 |
|
|
| 25 Apr 2014 11:30 AM |
I think I have to wait for the backpack to load and then put the weapons in.
--The ed edd n eddy fanboy of ot-- Be polite, be professional, but have a plan to kill everybody you meet. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 11:36 AM |
So then
character = game.Workspace.Player plrs = game.Players:GetPlayers weapons = pickedMap.Weapons:GetChildren()
repeat wait() until plrs:GetPlayerFromCharacter(character) for i = 1, #plrs do print("Got plrs") for x = 1, #weapons do print("Got weapons") ss = weapons[x]:clone() print("Cloned weapons") ss.Parent = plrs[i].Backpack print("Players have weapons") end end |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 25 Apr 2014 11:51 AM |
| Just have a map rotation script and make it run another sript(specific for each map) and inside the script access the starterpack game.Workspace.starterpack(or wherever it is) then delete it's contents and then re-add what you want. |
|
|
| Report Abuse |
|
|
badfitz99
|
  |
| Joined: 01 May 2010 |
| Total Posts: 5854 |
|
|
| 25 Apr 2014 11:59 AM |
I'm only making the game with one script that controls the map chooser and where the players spawn.
--The ed edd n eddy fanboy of ot-- Be polite, be professional, but have a plan to kill everybody you meet. |
|
|
| Report Abuse |
|
|