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

Why does my fire move explode prematurely? (More info in desc)

Asked by 5 years ago

Code:

v.Touched:Connect(function(hit)
            if hit.Parent ~= nil then
                local tween = game:GetService("TweenService")
            local boom = TweenInfo.new(0.4,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0)
            local boomprop = {Anchored = true;CanCollide = false;Transparency = 1;Size = Vector3.new(48,48,48) }
            local ew = tween:Create(v,boom,boomprop)
            ew:Play()
            end
        end)
        end
    end
    end)

I tried making the balls explode when they either touched a player or the environment. But even though they haven't touched the ground yet they explode. Why is this?

0
.Touched must be firing from something other than an enemy player or the environment. Perhaps the player who fired? You need to find what's triggering the .Touched event by printing it (print(hit.Name)). Once you know this, you can put in an if check (if hit ~= whiteListedObject then) so it doesn't fire in future. LukeSmasher 619 — 5y
0
Ohh wait let me try that xXKingCool258Xx 39 — 5y
0
Dear sir, I've identified the problem, but when I do if hit.Parent.Name ~= "Model" it won't explode anymore, since it touches the model first. I've ungrouped but now It touches its other fireballs and when it does it explodes, if I blacklist, it won't explode xXKingCool258Xx 39 — 5y
0
make a wait(.4) before the touch event SuperAstroGame -2 — 5y

Answer this question