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

How to make brick explode if you touch it? [closed]

Asked by 5 years ago
Edited 5 years ago

So, I need help with mine for my friend and his war place. I need to do some mine, so if you step on it, it will explode, and it will kill player. Can someone help me with that? I need it work with FE.

0
You need to add an Explosion effect to the part when touched. You need a localscript to startercharacterscritps, a remote event and a normal script. Localscript is firing the remoteevent when part touched, script is adding the Explosion effect. If you don't know how to do this, I will do it if you want. Miniller 562 — 5y
0
don't post request questions DeceptiveCaster 3761 — 5y
0
Wow, I just need someone help with scripting, I don`t need the script. I, NEED, HELP. mariofl2003 11 — 5y

Closed as Not Constructive by DeceptiveCaster and evaera

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.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 5 years ago

This is a fairly easy thing to do, you just use the Touched event to check if the parts been touched, and if so, check if the thing touching the part is a player.

local part = script.Parent

part.Touched:Connect(function(plr)
    if plr.Parent:FindFirstChild("Humanoid") ~= nil then -- if it is a player
        local explosion = Instance.new("Explosion") -- create an explosion
        explosion.Parent = part
        explosion.Position = part.Position -- make the explosion's position be the part's position
    end
end)
0
I tested this, and it works with FE. TheGreenSuperman 85 — 5y
Ad