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

Can the .Touched event be overflowed? (no FilteringEnabled)

Asked by
y3_th 176
6 years ago
Edited 6 years ago

I intend to use the .Touched event in order to delete players that fall behind and get consumed by a part, but whenever they touch 2 or more parts, they don't end up getting destroyed and stay. The intended outcome still occurs with players that touch less than 2 parts. I tested different functions that influence parts that are hit, yet the problem still persists.

--victim

script.Parent.Touched:Connect(function(h)
    if h.Name = "destroyer" then
        script.Parent:Destroy() --destroyed when touches destroyer
    end
end)
--destroyer

local rs = game:GetService("RunService")

rs.RenderStepped:Connect(function()
    script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, -0.25, 0)

    --all players are supposed to go to bottom of the screen, so they die if they remain at top
end)

As one script; still doesn't work:

--destroyer

local rs = game:GetService("RunService")

rs.RenderStepped:Connect(function()
    script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, -0.25, 0)

    --all players are supposed to go to bottom of the screen, so they die if they remain at top; destroyer goes down, players go down or die
end)

script.Parent.Touched:Connect(function(h)
    if h.ClassName == "UnionOperation" then --players are in marbles
        h:Destroy() --destroy marble
    end
end)
0
Touched will not overflow it fires upon any intersection or would-be intersection. The physics is quite good about that. Maybe it's the over complication you have created. cabbler 1942 — 6y
0
I tried putting it all into one script, and it still didn't work. Any suggestions? y3_th 176 — 6y

Answer this question