Log in to vote

How do I make a button cause an explosion somewhere else upon clicking? [closed]

Asked by 2 months ago

Hi, I'm working on a game where you answer questions to see if you're a pro or a noob, and my idea is if you choose pro, you get to do fun stuff to the noobs. If you're a noob, however, you get to try to avoid the pro's attacks.

Btw, try explaining what your issue/problem is and not what the game is about. :) Mineloxer 75 — 2mo

Closed as Not Constructive by CootKitty, abnotaddable, and Goulstem

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.


Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.




Now back to your regularly scheduled Scripting Helpers....




1 answer

Log in to vote
Answered by 2 months ago
Edited 2 months ago

Consider this:

local clickDetector = script.Parent --//Where the clickDetector is
local part = workspace.Part --//Where the part with the explosion will be

    --//Create new explosion, don't set parent yet.
    local newExplo ="Explosion")
    --//Change the newExplo properties however you want
    newExplo.Position = part.Position --//Thanks to CootKitty for the reminder
    newExplo.Parent = part --//Finally set the parent at the end
You have to set the position of the Explosion, the position doesn't get set when you parent the explosion. CootKitty 284 — 2mo