|
| 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
|
  |
| 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 |
|
|
| |
|
LockFocus
|
  |
| Joined: 31 Aug 2013 |
| Total Posts: 1044 |
|
| |
|
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 |
|
|
| |
|
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 |
|
|