peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
|
| 17 Jun 2016 12:46 AM |
the weapons go to the same pad everytime can I get some help
https://gyazo.com/6c48eab34e7447e17ca36e07f7d5db3e
script:
newspawn = workspace["new spawn"] weapons = game.ServerStorage:GetChildren() spawns = workspace.WeaponSpawns:GetChildren()
newspawn.Changed:connect(function() wait(2) for i,v in pairs(game.ServerStorage:GetChildren()) do v:Clone() print("Cloned") v.Parent = workspace print("parented") for p,b in pairs(v:GetChildren()) do if b:IsA("Part") then b.CFrame = CFrame.new(spawns[i].Position) end end end end)
|
|
|
| Report Abuse |
|
|
|
| 17 Jun 2016 12:47 AM |
| i dont see any attempt at making it random |
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
| |
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
| |
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
| |
|
|
| 17 Jun 2016 01:01 AM |
lazy and just woke up so this is sort of pseudo code combined with lazy code
c=weapons:children for i=1,#c do spawn=spawns:children[math.random(1,#spawns:children()) ] spawn. parent=workspace c[i].Cframe=spawn. parent end |
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
|
| 17 Jun 2016 01:10 AM |
I dont know how to add that to my code
|
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
| |
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 17 Jun 2016 01:30 AM |
newspawn = workspace["new spawn"] weapons = game.ServerStorage:GetChildren() spawns = workspace.WeaponSpawns:GetChildren()
newspawn.Changed:connect(function() local fakeTable = spawns for i,Tool in pairs(game.ServerStorage:GetChildren()) do local v = math.random(1,#fakeTable) local spawn = fakeTable[val] local newTool = Tool:Clone() newTool.Parent = game.Workspace newTool.Handle.CFrame = spawn.CFrame table.remove(fakeTable,val) end end)
the power of the meme ( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
| |
|
peIicans
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1148 |
|
| |
|