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: Firework auto?

Previous Thread :: Next Thread 
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
05 Jul 2014 05:26 PM
Lets say I have the bundle of fireworks as a model. I place it in my place. How would I get it to go off at after a certain amount automatically, and it is looped that way?
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 05:27 PM
scriptOn = true

repeat
--Code Here
until scriptOn == false
print('Script Off')


You don't ever have to change script on.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
05 Jul 2014 05:28 PM
The code makes no sense though.
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 05:30 PM
scriptOn = true --Makes the repeat go on when true

repeat -- Repeats the code below
--Code Here
until scriptOn == false --Makes it so the script above always repeats until scriptOn == false
print('Script Off') --Just prints that the script is off
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
05 Jul 2014 05:32 PM
And I put this script in the bundle of fireworks?
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 05:32 PM
Yeah, you need to add the code to make it actually work in there.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
05 Jul 2014 05:34 PM
Okay.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
07 Jul 2014 03:05 AM
Okay, so I took the firework,'The Big one' and placed it in my place, I then took out the model, 'Handle' because that is basically the whole firework, and it isn't a tool, or animation like throwing it and pressing buttons on it. I place the script you gave inside the model handle and all it does it crash Roblox studio when testing and stops scripting in game. little help?
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
07 Jul 2014 11:54 AM
Bump
Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
07 Jul 2014 12:00 PM
[ Content Deleted ]
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
07 Jul 2014 01:35 PM
Okay, now it doesn't crash studio but it still doesn't activate the particles in the main script.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
07 Jul 2014 01:58 PM
Bump
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
07 Jul 2014 02:43 PM
Bump..
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
07 Jul 2014 03:15 PM
Give us your full code.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
07 Jul 2014 04:48 PM
I already told you guys how I got the firework, and heres the script that was in it.

--Made by Stickmasterluke


--This code got messy quick. Forgive me


local sp=script.Parent


local launcher=sp
local debris=game:GetService("Debris")

local bang4=launcher:WaitForChild("Bang4")
local pop2=launcher:WaitForChild("Pop2")
local fountain=launcher:WaitForChild("Fountain")


local bangsounds={160248459,160248479,160248493}
function makerandombang()
local bang=Instance.new("Sound")
debris:AddItem(bang,10)
bang.Volume=1
bang.Pitch=.8+math.random()*.4
bang.SoundId="http://www.roblox.com/asset/?id="..bangsounds[math.random(1,3)]
return bang
end

local colors={"red","orange","yellow","green","blue","purple"}
function flare(pos,vel,floaty,timer,color)
local floaty=floaty or 0
local timer=timer or 2
local p=Instance.new("Part")
p.Name="EffectFlare"
p.Transparency=1
p.TopSurface="Smooth"
p.BottomSurface="Smooth"
p.formFactor="Custom"
p.Size=Vector3.new(.4,.4,.4)
p.CanCollide=false
p.CFrame=CFrame.new(pos)*CFrame.Angles(math.pi,0,0)
p.Velocity=vel

local particles={}

local s=Instance.new("Sparkles")
s.SparkleColor=Color3.new(1,1,0)
s.Parent=p
table.insert(particles,s)
local s2=Instance.new("Sparkles")
s2.Parent=p
table.insert(particles,s2)

local s3=Instance.new("Sparkles")
s3.SparkleColor=Color3.new(1,1,0)
s3.Parent=p
table.insert(particles,s3)
local s4=Instance.new("Sparkles")
s4.Parent=p
table.insert(particles,s4)

local f=Instance.new("Fire")
f.Color=Color3.new(1,1,.5)
f.SecondaryColor=Color3.new(1,1,1)
f.Heat=25
f.Parent=p
table.insert(particles,f)

if color=="red" then
s.SparkleColor=Color3.new(1,0,0)
s3.SparkleColor=Color3.new(1,0,0)
f.Color=Color3.new(1,0,0)
elseif color=="blue" then
s.SparkleColor=Color3.new(0,0,1)
s3.SparkleColor=Color3.new(0,0,1)
f.Color=Color3.new(0,0,1)
elseif color=="green" then
s.SparkleColor=Color3.new(0,1,0)
s3.SparkleColor=Color3.new(0,1,0)
f.Color=Color3.new(0,1,0)
elseif color=="yellow" then
s.SparkleColor=Color3.new(1,1,0)
s3.SparkleColor=Color3.new(1,1,0)
f.Color=Color3.new(1,1,0)
elseif color=="purple" then
s.SparkleColor=Color3.new(1,0,1)
s3.SparkleColor=Color3.new(1,0,1)
f.Color=Color3.new(1,0,1)
elseif color=="orange" then
s.SparkleColor=Color3.new(1,.5,0)
s3.SparkleColor=Color3.new(1,.5,0)
f.Color=Color3.new(1,.5,0)
end

if floaty>0 then
local bf=Instance.new("BodyForce")
bf.force=Vector3.new(0,p:GetMass()*196.2*floaty,0)
bf.Parent=p
end
debris:AddItem(p,timer+3)
p.Parent=game.Workspace
delay(timer,function()
for _,v in pairs(particles) do
if v and v.Parent and v.Enabled then
v.Enabled=false
end
end
end)

return p
end

function fireclassic()
for i=1,3 do
delay(0,function()
local clr=colors[math.random(1,#colors)]
local b4c=bang4:clone()
debris:AddItem(b4c,7)
b4c.Parent=launcher
local flare1=flare(launcher.Position,(CFrame.Angles(math.pi/2,0,0)*CFrame.Angles((math.random()-.5)*.5,(math.random()-.5)*.5,0)).lookVector*100,.8,2)
flare1.RotVelocity=Vector3.new(math.random()-.5,math.random()-.5,math.random()-.5)*100
local b=makerandombang()
b.Parent=flare1
wait()
if b4c then
b4c:Play()
end
wait(2.5)
if flare1 and b then
b:Play()
for i=1,7 do
local f=flare(flare1.Position,(launcher.CFrame*CFrame.Angles((i/7)*math.pi*2,0,0)).lookVector*20,.95,3,clr)
if i==7 then
local s=Instance.new("Sound")
s.Volume=1
s.SoundId="http://www.roblox.com/asset/?id=160247625"
s.Pitch=.5
s.Parent=f
wait()
if s then
s:Play()
end
end
end
end
end)
wait(.4)
end
end

local clrcount=0
function firefan()
fountain:Play()
for i=1,7 do
pop2:Play()
clrcount=(clrcount+1)%(#colors)
local f=flare(launcher.Position,(launcher.CFrame*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles((((i-1)/6)-.5)*1.5,0,0)).lookVector*30,.95,2.,colors[clrcount+1])
local s=Instance.new("Sound")
s.Pitch=.5+(math.random()*.1)
s.SoundId="http://www.roblox.com/asset/?id=160248604"
s.Parent=f
wait()
if s then
s:Play()
end
wait(.3)
end
wait(.3)
for i=1,7 do
pop2:Play()
clrcount=(clrcount+1)%(#colors)
local f=flare(launcher.Position,(launcher.CFrame*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(((1-((i-1)/6))-.5)*1.5,0,0)).lookVector*30,.95,2,colors[clrcount+1])
local s=Instance.new("Sound")
s.Pitch=.5+(math.random()*.1)
s.SoundId="http://www.roblox.com/asset/?id=160248604"
s.Parent=f
wait()
if s then
s:Play()
end
wait(.3)
end
fountain:Stop()
end

function firedisplay()
bang4:Play()
flare(launcher.Position,(launcher.CFrame*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(.8,0,0)).lookVector*20,.95,2)
flare(launcher.Position,(launcher.CFrame*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(-.8,0,0)).lookVector*20,.95,2)
wait(.5)
bang4:Play()
flare(launcher.Position,(launcher.CFrame*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(.5,0,0)).lookVector*25,.95,2)
flare(launcher.Position,(launcher.CFrame*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(-.5,0,0)).lookVector*25,.95,2)
wait(.5)
bang4:Play()
flare(launcher.Position,(launcher.CFrame*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(.25,0,0)).lookVector*32,.95,2)
flare(launcher.Position,(launcher.CFrame*CFrame.Angles(math.pi/2,0,0)*CFrame.Angles(-.25,0,0)).lookVector*32,.95,2)
wait(1)
bang4:Play()
local flare1=flare(launcher.Position,Vector3.new(0,100,0),.8,1)
local b=Instance.new("Sound")
debris:AddItem(b,10)
b.Volume=1
b.SoundId="http://www.roblox.com/asset/?id=160248522"
b.Parent=flare1
wait(1)
if flare1 and b then
b:Play()
for i=1,5 do
clrcount=(clrcount+1)%(#colors)
flare(flare1.Position,(launcher.CFrame*CFrame.Angles((i/5)*math.pi*2,0,0)).lookVector*20,.95,2,colors[clrcount+1])
end
end
end


wait(.1)
local fuse=Instance.new("Part")
fuse.Name="EffectFuse"
fuse.formFactor="Custom"
fuse.Size=Vector3.new(0,0,0)
fuse.Anchored=false
fuse.CanCollide=false
fuse.Transparency=1
local fusefire=Instance.new("Fire")
fusefire.Size=0
fusefire.Parent=fuse
fuse.Parent=sp
local w=Instance.new("Weld")
w.Part0=sp
w.Part1=fuse
w.C0=CFrame.new(-.3,-1.8,1.4)
w.Parent=sp

wait(7)

if fusefire then
fusefire.Enabled=false
end
wait(2)
delay(0,firefan)
wait(4.5)
delay(0,firedisplay)
wait(4)
delay(0,firefan)
delay(4.5,firefan)
delay(9,firefan)
wait(7)
delay(0,fireclassic)
wait(7)
delay(0,fireclassic)
wait(1)
delay(0,fireclassic)
wait(2)
--delay(0,firefan)
delay(0,fireclassic)
wait(1)
delay(0,firedisplay)
wait(9)
sp:remove()


Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
08 Jul 2014 12:11 AM
bump
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
08 Jul 2014 06:04 PM
bump
Report Abuse
enzo90 is not online. enzo90
Joined: 25 Mar 2012
Total Posts: 7104
08 Jul 2014 06:07 PM
while true do
--Script here

end
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
08 Jul 2014 06:16 PM
Doesn't work.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
08 Jul 2014 06:33 PM
bump again
Report Abuse
enzo90 is not online. enzo90
Joined: 25 Mar 2012
Total Posts: 7104
08 Jul 2014 06:36 PM
Remove the end from it.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
08 Jul 2014 07:14 PM
Okay, well I figured out why the script wasn't doing anything. It was disabled in the properties. So, I abled it and now im getting a error in the out put as well ROBLOX Lua Debugger keeps popping up. The output keeps saying - Workspace.Firework.Firework
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
08 Jul 2014 07:26 PM
Come on guys, I need this done today. It's been 3 days.
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
08 Jul 2014 07:59 PM
Bump again
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
08 Jul 2014 08:12 PM
I guess you guys quit helping me... I'll just try to figure it out myself.. Even though I have no idea what I will be doing.
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