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: Click to explode named brick?

Previous Thread :: Next Thread 
TheHidden0892 is not online. TheHidden0892
Joined: 07 Nov 2012
Total Posts: 285
28 May 2015 09:58 PM
Hello, how would I change parts of the script to make it where you click and explodes the name brick in the script? I have changed the name of the part and changed the name in the script but, it doesn't work out.





function onClicked()
local deer = Instance.new("Explosion")

deer.BlastRadius = 10

deer.BlastPressure = 99999

deer.Parent = game.Workspace

deer.Position = script.Parent.Parent.door.Position
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
28 May 2015 10:20 PM
Add a click detector to the part
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
29 May 2015 08:40 AM
function onClicked()
local deer = Instance.new("Explosion")

deer.BlastRadius = 10

deer.BlastPressure = 99999

deer.Parent = script.Parent

deer.Position = script.Parent.Parent.door.Position
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
29 May 2015 01:44 PM
^ pointless post
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
29 May 2015 03:58 PM
i fixed it fool
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
29 May 2015 07:44 PM
all it needed was a click detector in the part fool
Report Abuse
TheHidden0892 is not online. TheHidden0892
Joined: 07 Nov 2012
Total Posts: 285
29 May 2015 07:54 PM
No, it already had included that. The problem is, that if you decide to make copies of it, the rename the part with the scrip and rename the part's name in the script, it would create an explosion elsewhere. May be part of line 2 with "local"?
I need to just have it changed to on click explode at position of the named part.
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
29 May 2015 07:56 PM
.. are u still having problems..
Report Abuse
TheHidden0892 is not online. TheHidden0892
Joined: 07 Nov 2012
Total Posts: 285
29 May 2015 08:11 PM
Pretty much :c
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
29 May 2015 08:40 PM
function onClicked()
local deer = Instance.new("Explosion")

deer.BlastRadius = 10

deer.BlastPressure = 99999

deer.Parent = game.Workspace

deer.Position = script.Parent.Parent.door.Position
end

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


So basically if u want it to do it somewhere else u would have to

make a new local under deer like

Local b = instance.new(explosion or what not)
-go through the same code

b.position = any block u want
Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
29 May 2015 08:40 PM
"deer.Position = script.Parent.Parent.door.Position"
deer.Position = script.Parent.Parent.door.CFrame.p

// cpmoderator \\ INTJ personality //
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
29 May 2015 08:41 PM
its gonna look like


function onClicked()
local deer = Instance.new("Explosion")
local b = Instance.new("Explosion")

deer.BlastRadius = 10

deer.BlastPressure = 99999

deer.Parent = game.Workspace

b. blastR

b.blastp

b.parent

b.position

deer.Position = script.Parent.Parent.door.Position
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
29 May 2015 08:43 PM
DONT USE THE DOOR'S POSITION ATTRIBUTE
USE ITS CFrame.p

// cpmoderator \\ INTJ personality //
Report Abuse
TheHidden0892 is not online. TheHidden0892
Joined: 07 Nov 2012
Total Posts: 285
29 May 2015 11:16 PM
So would I use b.Position= NAMEHERE?
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
30 May 2015 08:41 AM
script.Parent.ClickDetector.MouseClick:connect(function()
local h = Instance.new("Explosion")
h.Position = game.Workspace.Part.Position
h.Parent = game.Workspace
end)
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
30 May 2015 10:26 AM
for example b would be (if u had a block name part)


b.position = game.workspace.part.position
Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
30 May 2015 12:17 PM
deer.cframe = script.parent.parent.door.cframe.p


// cpmoderator \\ INTJ personality //
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
30 May 2015 02:57 PM
STOP WITH DA CFRAME
Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
30 May 2015 02:58 PM
@xlaser
POSITION DOESN'T DO ANYTHING
YOU HAVE TO USE CFRAME.P BECAUSE POSITION IS A VECTOR3 VALUE AND VECTOR3 VALUES ONLY ADD TO THE POSITION, NOT MAKE IT AN ABSOLUTE POSITION!

// cpmoderator \\ INTJ personality //
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
30 May 2015 03:00 PM
fite me nao
Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
30 May 2015 03:04 PM
Ok, xlaser. Bring it on.

You're nothing but an ignorant parasite.
Get out of Scripters and never come back.
You never know what is right, and you never will, you incoherent d0uche.
So again, get out and never come back.

// cpmoderator \\ INTJ personality //
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
30 May 2015 03:14 PM
But i solved his problem ^_^


u cheap cheeky skrub ill 420 lens flare ur azz in phatiom forces
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
30 May 2015 08:36 PM
mine worked u idiot your so lazy
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
30 May 2015 08:43 PM
URS WAS COPY pASTE SKRUB
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
30 May 2015 08:48 PM
no it wasn't are u stupid
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