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

Touched Event not firing?

Asked by
Maxis_s 97
4 years ago

This script seems to not print anything (or does anything in general). It still fires the EyeBlinder event though.

Script:

if ExplosionSize >= 150 then
    game.ReplicatedStorage.Events.EyeBlinder:FireAllClients()
    local function ShockwaveTouch(Touch)
        print(Touch.ClassName)
        if Touch.Parent:FindFirstChild("Humanoid") == nil then
            if Touch.ClassName == "Part" or Touch.ClassName == "MeshPart" or Touch.ClassName == "UnionOperation" then
                if Touch.Locked == false then
                    if Touch.Parent ~= Explosion then
                        Touch.Anchored = false
                    end
                end
            end
        end
    end

    Explosion.Shockwave.Touched:Connect(ShockwaveTouch)
end
0
Is the shockwave something with a hitbox? CHEESEPIZZAPARTYTIME 5 — 4y
0
The shockwave is a mesh. I have another touch script for it that works completely fine. Maxis_s 97 — 4y
0
Make sure you're using server script for these reasons. Shounak123 461 — 4y

Answer this question