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: Help Instance.new

Previous Thread :: Next Thread 
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 02:34 AM
Why is "Explosion Unknown Globally" ?

-- PastDays
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 03:05 AM
any help?

-- PastDays
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 03:13 AM
Why isnt this working

function onClicked()
script.Parent.C4.Transparency = 0
script.Parent.Transparency = 1
wait(2) Instance.new(Explosion)
Explosion.Parent = script.Parent.C4
script.Parent.destroy()


end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

-- PastDays
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 03:20 AM
function onClicked()
script.Parent.C4.Transparency = 0
script.Parent.Transparency = 1
wait(2) Instance.new(explosion)
explosion.Parent = script.Parent.C4
script.Parent:Destroy()


end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

Why isn't this working for me the explosion doesn't happen and it isn't removed.

-- PastDays
Report Abuse
StringedVortex is not online. StringedVortex
Joined: 28 Jun 2015
Total Posts: 1846
08 Aug 2016 03:23 AM
it's supposed to be in quotes for ex


local EX = Instance.new("Explosion")
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 03:25 AM
Well this is what i've now got and i still dont see an explosion.

local Exp = Instance.new("Explosion")


function onClicked()
script.Parent.C4.Transparency = 0
script.Parent.Transparency = 1
wait(2)
Exp.Parent = script.Parent.C4
script.Parent:Destroy()


end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

-- PastDays
Report Abuse
StringedVortex is not online. StringedVortex
Joined: 28 Jun 2015
Total Posts: 1846
08 Aug 2016 03:26 AM
lel the explosion already happens thats why.
you need to insert the explosion after you wait(2)
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 03:28 AM
like this? because it still isn't working

function onClicked()
script.Parent.C4.Transparency = 0
script.Parent.Transparency = 1
wait(2)
local Exp = Instance.new("Explosion")

Exp.Parent = script.Parent.C4
script.Parent:Destroy()


end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

-- PastDays
Report Abuse
StringedVortex is not online. StringedVortex
Joined: 28 Jun 2015
Total Posts: 1846
08 Aug 2016 03:32 AM
local Exp = Instance.new("Explosion", Workspace.C4) -- change it to where the C4 is parent instead of making the C4 parent.
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 03:34 AM
Still see no explosion.

function onClicked()
script.Parent.C4.Transparency = 0
script.Parent.Transparency = 1
wait(2)
local Exp = Instance.new("Explosion", game.Workspace.B1.C4)
wait(1)
script.Parent:Destroy()


end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

-- PastDays
Report Abuse
StringedVortex is not online. StringedVortex
Joined: 28 Jun 2015
Total Posts: 1846
08 Aug 2016 03:39 AM
hmm last time i checked it worked maybe roblox had an update... check the output is it good?
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 03:43 AM
'Global'explosion'is only used in the enclosing function;consider changing it to local

-- PastDays
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 03:44 AM
In view i turn on Output yet it isnt telling me any runnning scripts.

-- PastDays
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 03:50 AM
Ii cant believe the stress such a small script can cause me.

-- PastDays
Report Abuse
DesiredROBLOXlAN is not online. DesiredROBLOXlAN
Joined: 01 Mar 2012
Total Posts: 971
08 Aug 2016 04:01 AM
Okay so this is what you need to do!


function onClicked()
script.Parent.C4.Transparency = 0
script.Parent.Transparency = 1
wait(2)
local Exp = Instance.new("Explosion")
Exp.Parent = game.Workspace.B1.C4
Exp.Position = Vector3.new(POSITION)-- change this position to the position you want the explosion to occur!

wait(1.5)
script.Parent:Destroy()


end

script.Parent.ClickDetector.MouseClick:connect(onClicked)


~The most desired of Robloxians
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
08 Aug 2016 05:02 AM
naw set up the position of the explosion :P
Report Abuse
PastDays is not online. PastDays
Joined: 09 Jan 2011
Total Posts: 732
08 Aug 2016 05:23 AM
Sorry i didnt reply i had to do something.


function onClicked()
script.Parent.C4.Transparency = 0
script.Parent.Transparency = 1
wait(2)
local Exp = Instance.new("Explosion")
Exp.Parent = game.Workspace.B1.C4
Exp.Position = Vector3.new(24.4, 23.4, -18)-- change this position to the position you want the explosion to occur!

wait(1.5)
script.Parent:Destroy()


end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

This still isn't working

-- PastDays
Report Abuse
StringedVortex is not online. StringedVortex
Joined: 28 Jun 2015
Total Posts: 1846
08 Aug 2016 06:14 PM
strange when i tested it it worked.
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