Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

2 comments

0

line 6

0

Make lua block pls :(

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.