|
| 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
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
|
| 28 May 2015 10:20 PM |
| Add a click detector to the part |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
| |
|
Luminak
|
  |
| Joined: 27 May 2012 |
| Total Posts: 2809 |
|
| |
|
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 |
|
|
|
| 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
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
|
| 29 May 2015 07:56 PM |
| .. are u still having problems.. |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 29 May 2015 08:43 PM |
DONT USE THE DOOR'S POSITION ATTRIBUTE USE ITS CFrame.p
// cpmoderator \\ INTJ personality // |
|
|
| Report Abuse |
|
|
|
| 29 May 2015 11:16 PM |
| So would I use b.Position= NAMEHERE? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 30 May 2015 12:17 PM |
deer.cframe = script.parent.parent.door.cframe.p
// cpmoderator \\ INTJ personality // |
|
|
| Report Abuse |
|
|
xlaser23
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
| |
|
|
| 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
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| Joined: 27 May 2012 |
| Total Posts: 2809 |
|
|
| 30 May 2015 08:36 PM |
| mine worked u idiot your so lazy |
|
|
| Report Abuse |
|
|
xlaser23
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
| |
|
Luminak
|
  |
| Joined: 27 May 2012 |
| Total Posts: 2809 |
|
| |
|