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: YES I HATE WHITE PEOPLE(but ur white D:)

Previous Thread :: Next Thread 
robocu3 is not online. 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 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
08 Mar 2014 05:30 PM
yes
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Mar 2014 05:36 PM
charpos.p
Report Abuse
robocu3 is not online. 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 is not online. 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 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
08 Mar 2014 06:05 PM
Yes.
Report Abuse
7y13rb is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
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