of     1   

KenzaShadow
#161473188Sunday, May 03, 2015 3:49 PM GMT

Hi I've mad a new script : "local Part = script.Parent function onTouch (Brick) local Player = Brick.Parent:findFirstChild("Humanoid") Player.Health = Player.Health - 100 end Part.Touched:connect(onTouch)" but I want it to Explode the player I don't know how to do it. Please explain how the script you're showing works, Because I'm a beginner at Lua
iFallenAtlantis
#161477091Sunday, May 03, 2015 4:45 PM GMT

The way your function is set up, it will never explode. Your function needs to create an explosion, which is an actual instance, and they explode as soon as they are in existance. So, instead of making the player's health at 0, try putting this in your function: Instance.new(Explosion) If this doesn't work, try explosion in lower-case (not caps) Hope this helps.
iFallenAtlantis
#161477275Sunday, May 03, 2015 4:48 PM GMT

I just read the rest of your post(lol) so here is how the script should look like: local Part = script.Parent function onTouch(Brick) Instance.new(Explosion) end Part.Touched:connect(onTouch) (This script basically says to create an explosion when a player touches it)
Friedtjof
#161478413Sunday, May 03, 2015 5:06 PM GMT

Pls no, cool. local Part = script.Parent function onTouch(Brick) local exp = Instance.new(Explosion) exp.Parent = game.Workspace exp.Position = Brick.Position exp.ExplosionType = "NoCraters" exp.DestroyJointRadiusPercent = 50 exp.BlastRadius = 6 exp.BlastPressure = 500000 end That sets every property of an explosion. Position and Parent are the only ones you really need, but you can toy with the others. Lord of all things, breaded and unbreaded.
Friedtjof
#161478476Sunday, May 03, 2015 5:07 PM GMT

Whoops, forgot quotes. local Part = script.Parent function onTouch(Brick) local exp = Instance.new("Explosion") exp.Parent = game.Workspace exp.Position = Brick.Position exp.ExplosionType = "NoCraters" exp.DestroyJointRadiusPercent = 50 exp.BlastRadius = 6 exp.BlastPressure = 500000 end Lord of all things, breaded and unbreaded.
KenzaShadow
#161508873Monday, May 04, 2015 12:13 AM GMT

Thank you Cool and ghost, although both of ur scripts didn't work, so I combined them together in the way I understand and i tworked. this is the script : "local Part = script.Parent function onTouch(Brick) local Player = Brick.Parent:findFirstChild("Humanoid") local E = Instance.new("Explosion") E.Parent = script.Parent E.Position = Brick.Position E.ExplosionType = "NoCraters" E.DestroyJointRadiusPercent = 50 E.BlastRadius = 6 E.BlastPressure = 500000 Player.Health = Player.Health - 100 end Part.Touched:connect(onTouch)"
KenzaShadow
#161509631Monday, May 04, 2015 12:23 AM GMT

Qorm
#161511854Monday, May 04, 2015 12:51 AM GMT

script.Parent.Touched:connect(function(onTouch) if onTouch.Parent:findFirstChild("Humanoid") then humanoid=onTouch.Parent.Humanoid explode=Instance.new("Explosion",humanoid.Parent) humanoid.Health=humanoid.Health-100 end end)
iFallenAtlantis
#161568363Tuesday, May 05, 2015 12:06 AM GMT

I played the game for you. Looks really cool when you die with the smoke effects.
KenzaShadow
#161595978Tuesday, May 05, 2015 2:25 PM GMT

@ Cool thank you. It's not done yet I plan on adding DBZ moves when I become a professional Lua scripter.
Mads898p
#161595998Tuesday, May 05, 2015 2:26 PM GMT

Whut?!
K7Q
#161598281Tuesday, May 05, 2015 3:43 PM GMT

dont listen to cool he can't script. do Instance.new("Explosion", game.Workspace.Part)
iFallenAtlantis
#161675455Wednesday, May 06, 2015 11:46 PM GMT

@K7Q I am very new to Lua also. That message was just to give him an idea of what to do.
drager980
#161677160Thursday, May 07, 2015 12:16 AM GMT

local radius = 30 -- radius of explosion local power = 200 -- power of explosion local timer = 3 -- time to wait before it can blow up again local debounce = false -- dont touch this one script.Parent.Touched:connect(funciton() if not debounce then debounce = true local e = Instance.new("Explosion",script.Parent) e.BlastRadius = radius e.BlastPressure = power e.Position = script.Parent.Position wait(timer) debounce = false end end) AND THE TIGER GOES ROAR
KenzaShadow
#161833344Saturday, May 09, 2015 6:23 PM GMT

I've already made the script and I've stated making a tool.
Mads898p
#162020111Tuesday, May 12, 2015 2:40 PM GMT

local radius = 30 -- radius of explosion local power = 200 -- power of explosion local timer = 3 -- time to wait before it can blow up again local debounce = false -- dont touch this one script.Parent.Touched:connect(funciton() if not debounce then debounce = true local e = Instance.new("Explosion",script.Parent) e.BlastRadius = radius e.BlastPressure = power e.Position = script.Parent.Position wait(timer) debounce = false end end)
StrangeAzAZ09azaZ
#226739663Monday, October 23, 2017 2:21 PM GMT

I LIKE DONUTS! ;-;
K7Q
#226744193Monday, October 23, 2017 5:37 PM GMT

...?
drager980
#226754356Monday, October 23, 2017 10:52 PM GMT

lol i spelt function wrong also if you do this you might want to do script.Parent.Touched:Connect(function(hit) if (not debounce) and not hit:IsGrounded() -- rest but it depends on what else you're going to do, and what hits what
pearldrop2468
#227498896Sunday, November 12, 2017 11:38 PM GMT

Dark, Thank You for the script, but for some random reason it doesn't really work & keeps giving me errors. E.g; Workspace.Explodes When ################## attempt to index local 'Player' (a nil value) That's what happens & it's very sad & irritating to me that I have to keep changing or fixing errors when on the other hand, you & other people apparently said it worked which confuses me and I just am completely lost. Also, Please do not put the quotation marks as when I copy & paste it says 'String not complete.' Thank you, though and hope you can fix this error for me!

    of     1