this lava script is supposed to only kill someone if they are not on a certain team, but I cant seem to be able to access the players TeamColor correctly.
function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
if part.Parent.Player.TeamColor ~= script.Parent.Parent.Parent.Parent.Parent.TeamColor.Value then
humanoid.Health = 0 -- damage the humanoid
end
end
end
script.Parent.Touched:connect(onTouch)
