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 » Scripters
Home Search
 

Re: Script Help

Previous Thread :: Next Thread 
ScriptedCurse is not online. ScriptedCurse
Joined: 18 Jan 2013
Total Posts: 8282
26 Sep 2016 03:05 PM
I am making a leaf particles script so when you touch a part, particles will come. But, there is something wrong with one part in my script. I highlighted the error so you guys can see it.

My script:

script.Parent.Touched:connect(function()
print("on")
local LeafParticles = Instance.new("ParticleEmitter")
LeafParticles.Parent = workspace["Leaf Pile"]
LeafParticles.Texture = "http://www.roblox.com/asset/?id=88667513"
LeafParticles.Lifetime = 0.7 -- Error
LeafParticles.Rate = 50
LeafParticles.Rotation = 720
LeafParticles.Speed = 5
LeafParticles.VelocitySpread = 80
script.Parent.TouchEnded:connect(function()
LeafParticles.Texture = ""
print("off")
end)
end)

Error in output:

16:01:57.462 - Workspace.Leaf Pile.Script:6: bad argument #3 to 'Lifetime' (NumberRange expected, got number)

Report Abuse
LockFocus is not online. LockFocus
Joined: 31 Aug 2013
Total Posts: 1044
26 Sep 2016 03:08 PM
http://wiki.roblox.com/index.php?title=API:NumberRange

Lifetime used a Numberrange

LeafParticles.Lifetime = NumerRange.new(min, max)
Report Abuse
ScriptedCurse is not online. ScriptedCurse
Joined: 18 Jan 2013
Total Posts: 8282
26 Sep 2016 03:08 PM
b1
Report Abuse
LockFocus is not online. LockFocus
Joined: 31 Aug 2013
Total Posts: 1044
26 Sep 2016 03:09 PM
@OP
u just got ninja'd
Report Abuse
qqtt991 is not online. qqtt991
Joined: 14 Dec 2007
Total Posts: 1387
26 Sep 2016 03:12 PM
Really, if you'd just read the error you could have found what's wrong yourself.
It's [CurrentYear], why aren't you googling your problems?
Report Abuse
ScriptedCurse is not online. ScriptedCurse
Joined: 18 Jan 2013
Total Posts: 8282
26 Sep 2016 03:18 PM
Oh, sorry.
Report Abuse
DevObject is not online. DevObject
Joined: 28 Jul 2011
Total Posts: 7048
26 Sep 2016 03:22 PM
http://wiki.roblox.com/index.php?title=API:Class/ParticleEmitter/Lifetime


Lol'd >Add 5k posts, R.I.P. ROBLOXBaseWarsFPS1
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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