Jiquor
|
  |
| Joined: 02 Jun 2008 |
| Total Posts: 10249 |
|
|
| 09 Jun 2016 04:36 AM |
How would I use these intervals or mess with them to make it so sparkles are enabled on something when it spawns?
I want to use Sparkles on a brick, but I want them disabled at first. When the brick spawns, wait 2 seconds before Sparkles activate from "Not Enabled" to "Enabled".
How to resolve this?
wait(10) script.Parent.Sparkles.Enabled = true script:Remove()
|
|
|
| Report Abuse |
|
|
|
| 09 Jun 2016 06:14 AM |
Are you talking about enabling the sparkles 2 seconds after the brick spawns? If so, try this code:
local b = --Instance.new("Part") or :Clone() --do stuff to b b.Position = --the position you want it to spawn local s = --Instance.new("Sparkles") or :Clone() -do stuff to s s.Parent = b b.Parent = --workspace or wherever you want it to go wait(2) s.Enabled = true
public static void main(String[] args) { System.out.println("Oops! Wrong language."); } |
|
|
| Report Abuse |
|
|
0Dan
|
  |
| Joined: 22 Oct 2009 |
| Total Posts: 2552 |
|
|
| 09 Jun 2016 06:44 AM |
Just create a new instance if you're not using the sparkles at first
wait(2) local Sparkles = Instance.new("Sparkles", script.Parent)
|
|
|
| Report Abuse |
|
|
Jiquor
|
  |
| Joined: 02 Jun 2008 |
| Total Posts: 10249 |
|
| |
|