I'm trying to make a simple bomb puzzle akin to what you'd find in a 2D Zelda dungeon. I already have the effect, but I don't know how to make the wall listen for the input.
This is the important part of the bomb script:
script.Parent.Size = Vector3.new(15,15,15) --Expand the hurtbox to be more generous
script.Parent.Ouch.Disabled = false --Hurtbox enabled
wait(0)
game.ReplicatedStorage.Boom:FireAllClients()--Send Boom Signal
wait(0.3)
script.Parent.Size = Vector3.new(2.5, 2.5, 2.5) --Return to Normal Size
script.Parent.Ouch.Disabled = true --Hurtbox disabled
Below the desired effect of the bomb "exploding" however, ReplicatedStorage isn't triggering any effect. I'd prefer not to use ReplicatedStorge all together, but I'm open to at least try any solutions I can get.
local active = false
local d = script.Parent.Door
game:GetService("ReplicatedStorage"):WaitForChild("Boom").OnServerEvent:Connect(function()
if active == false then
active = true
script.Parent.Opened:Play() --Crashing Sound
d.Transparency = 1
d.CanCollide = false
script.Parent.Bricks.Enabled = true --Debris
wait(0.5)
script.Parent.Bricks.Enabled = false
wait(5)
d.Transparency = 0
d.CanCollide = true
active = false
else
end
end)
