First of all something you NEED TO KNOW is that I AM NOT IN THIS GROUP!
No errors in the output. Why does this only change brickcolor once?
local part = script.Parent
local debounce = false
local players = game:GetService("Players")
local e = math.random(1,10)
game.Workspace.TouchPart.Touched:Connect(function(hit)
if not debounce and hit.Parent:FindFirstChild("Humanoid") and players:FindFirstChild(hit.Parent.Name) then
debounce = true
local plar = players:FindFirstChild(hit.Parent.Name)
if plar:IsInGroup(3467972) then
wait(1)
part.BrickColor = BrickColor.Green()
local e = math.random(1,10)
elseif e >= 5 then
part.BrickColor = BrickColor.Green()
else
part.BrickColor = BrickColor.Red()
end
debounce = false
end
end)
I hope you can help!
