local can = true
local p = script.Parent
p.Touched:Connect(function(a)
local hum = a.Parent:FindFirstChild("Humanoid")
if can == true then
if hum then
can = false
if can == false then
can = true
if can == true then
can = false
local plr = a.Parent.Name
local PLAYER = game.Players:FindFirstChild(plr)
PLAYER.leaderstats.Cash.Value = PLAYER.leaderstats.Cash.Value + 1
p.BrickColor = BrickColor.new("Dark stone grey")
wait(1)
p.BrickColor = BrickColor.new("CGA Brown")
can = true
end
end
end
end
end)
There is only one problem, this line: p.BrickColor = BrickColor.new("CGA Brown")
doesn’t work. Can you help? Thanks in advance