robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 Mar 2014 12:25 PM |
Rain = _G.Rain:Clone() charpos = script.Parent.Parent.Character:GetModelCFrame() while true do wait(.5) if Rain ~= nil then Rain.Parent = game.Workspace.CurrentCamera Rain.Position = charpos - Vector3.new(math.random(1, 10), -100, math.random(1, 10)) end end ^^^output; 12:23:17.461 - Players.Player1.PlayerGui.rain:7: bad argument #3 to 'Position' (Vector3 expected, got userdata) 12:23:17.461 - Script 'Players.Player1.PlayerGui.rain', Line 7 12:23:17.462 - stack end 12:23:20.259 - Exception: Cannot attach debugger -=Robo=- |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
| |
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
| |
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 Mar 2014 05:37 PM |
here is the global in a separate script; --Globals-- _G.Rain = Instance.new("Part") if _G.Rain.FormFactor ~= "Custom" then _G.FormFactor = "Custom" _G.Rain.Size = Vector3.new(0.2, 6.2, 0.2) _G.Rain.Transparency = .4 _G.Rain.BottomSurface = "Smooth" _G.Rain.TopSurface = "Smooth" _G.Rain.BrickColor = BrickColor.Blue() _G.Rain.Name = "RAAAIIN" end it's not changing to correct size and it deletes the previous one when it duplicates, why? -=Robo=- |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 Mar 2014 05:39 PM |
scratch that, it's not duplicating, it only duplicated the one and now it's changing random positions, why isn't it just dropping them? -=Robo=- |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
| |
|
7y13rb
|
  |
| Joined: 28 May 2011 |
| Total Posts: 223 |
|
|
| 08 Mar 2014 06:06 PM |
| add another clone somewhere then..like clone the clone |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 08 Mar 2014 06:07 PM |
Rain = _G.Rain:Clone() charpos = script.Parent.Parent.Character:GetModelCFrame() while true do local Rain = _G.Rain:Clone() --local and global variables at once omg hax wait(.5) if Rain ~= nil then Rain.Parent = game.Workspace.CurrentCamera Rain.Position = charpos.p - Vector3.new(math.random(1, 10), -100, math.random(1, 10)) end end |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 08 Mar 2014 06:08 PM |
| Take out the first line of my script ._. |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 Mar 2014 06:14 PM |
while true do charpos = script.Parent.Parent.Character:GetModelCFrame() Rain = Instance.new("Part") FormFactor = "Custom" Rain.Size = Vector3.new(0.2, 6.2, 0.2) Rain.Transparency = .4 Rain.BottomSurface = "Smooth" Rain.TopSurface = "Smooth" Rain.BrickColor = BrickColor.Blue() Rain.Name = "RAAAIIN" wait(.5) if Rain ~= nil then Rain.Parent = game.Workspace.CurrentCamera Rain.Position = charpos.p - Vector3.new(math.random(1, 10), -100, math.random(1, 10)) end end no error but still doesn't change to the correct size. -=Robo=- |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 Mar 2014 06:27 PM |
now it does, i fixed it, but why does it only ever spawn to the left of the player? not overhead? while true do charpos = script.Parent.Parent.Character:GetModelCFrame() Rain = Instance.new("Part") Rain.FormFactor = "Custom" Rain.CanCollide = false Rain.Size = Vector3.new(0.2, 6.2, 0.2) Rain.Transparency = .4 Rain.BottomSurface = "Smooth" Rain.TopSurface = "Smooth" Rain.BrickColor = BrickColor.Blue() Rain.Name = "RAAAIIN" wait() if Rain ~= nil then Rain.Parent = game.Workspace.CurrentCamera Rain.Position = script.Parent.Parent.Character.Torso.Position + Vector3.new(math.random(1, 100),100,math.random(1, 100)) end end -=Robo=- |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 08 Mar 2014 06:29 PM |
| Rain.Position = script.Parent.Parent.Character.Torso.Position + Vector3.new(math.random(1, 100)-50,100,math.random(1, 100)-50) |
|
|
| Report Abuse |
|
|