local Part = script.Parent
local Debounce = true
Part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if Debounce == true then
Debounce = false
warn("Touched works")
local Tycoons = game.Workspace["Zednov's Tycoon Kit"].Tycoons
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local PlayerTycoon = player.Team
for _,child in pairs(Tycoons:GetChildren()) do
if child.Owner.Value == player.Name then
warn("Tycoon found")
local PO = child.PurchasedObjects
if PO:FindFirstChild("Walls") then
warn("Walls found")
local Walls = PO.Walls.Colored:GetChildren()
for i,v in pairs(Walls) do
v.BrickColor = BrickColor.new(0.9,0.6,0.2)
end
break
else
warn("Walls not found")
break
end
end
end
wait(1)
Debounce = true
end
end
end)