Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How to make a nuke?

Asked by 8 years ago

Wouldn't it go something like

function onImpact(player)
local bob = Instance.new("Explosion");
bob.Position = game.Workspace.Part.Position;
bob.BlastRadius = 200;
bob.Parent = workspace;
end;
script.Parent.Touched:connect(onImpact)

2
I put your code in proper formatting. Shawnyg 4330 — 8y
2
what is with semi colons lol U DONT NEED those UniversalDreams 205 — 8y
1
lmao this isn't C# or JS this is lua get those semi-colons out of here Prioxis 673 — 8y
0
Not that this matters to your code but the Touched event doesn't return the Player it returns the part that touched it. But from what I can tell this code has no errors. User#11440 120 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Next time you post a question, please use the Lua formatting so it is easier to debug your code.

Anyways, what kind of nuke are you talking about? One that destroys everything and sets the Material to CorrodedMetal? or just an Explosion? If just an Explosion, then yes, that would work.

Ad

Answer this question