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)
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)
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
I put your code in proper formatting.
what is with semi colons lol U DONT NEED those
lmao this isn't C# or JS this is lua get those semi-colons out of here
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.