I’m developing a client-side system, but I’m facing an issue: when I activate the button, its color should change. The console confirms the change, but visually, nothing happens. I’ve checked, and no other button is interfering. Any help would be greatly appreciated!
Script:
local Folder = workspace.ButtonsFolder:WaitForChild("MustardWorld")
local Prompt
local Button
local X = 0
local CollectionService = game:GetService("CollectionService")
for _, buttonModel in pairs(CollectionService:GetTagged("MustardButtons")) do
Button = buttonModel:WaitForChild("Button")
Prompt = Button:WaitForChild("ProximityPrompt")
Prompt.Triggered:Connect(function()
print(Prompt.Parent.BrickColor)
if Button.Color == Color3.fromRGB(168, 0, 0) then
local Sound = Button:WaitForChild("Sound")
Sound:Play()
local Particle = Button:WaitForChild("ParticleEmitter")
Particle.Enabled = true
task.spawn(function()
wait(1)
Particle.Enabled = false
end)
Button.Color = Color3.fromRGB(36, 168, 21)
Prompt.Enabled = false
X = X + 1
print(X)
end
end)
end