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

it keeps on saying redpart is not a valid member of meshpart?

Asked by 4 years ago

local redpart = game.Workspace.redpart local theparts = {game.Workspace.Part1,game.Workspace.Part2,game.Workspace.Part3,game.Workspace.Part4}

redpart.Touched:Connect(function(hit) local redpart = script.Parent if hit.redpart:FindFirstChild("humanoid") then for i, v in pairs(theparts) do wait (3) v:destroy() end

end

end)

0
line 6 jamison1212 2 — 4y
0
Make lua block pls :( Xapelize 2658 — 4y

1 answer

Log in to vote
0
Answered by
SnowieDev 171
4 years ago
Edited 4 years ago

go nuts

local redpart = game.Workspace.redpart 
local theparts = {game.Workspace.Part1, game.Workspace.Part2, game.Workspace.Part3, game.Workspace.Part4}

redpart.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        for i, v in pairs(theparts) do
        wait (3)
        v:destroy()
        end
    end
end)
Ad

Answer this question