Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Event when a block changes color?

Is there a way to detect when an object's BrickColor property changes? I don't want to use while loops and if statements due to increased lag. Is there an event for this?

1 answer

✓ Accepted answer

You can use the GetPropertyChangedSignal, much like Changed, it Fires when a property was changed; however, this Signal allows you to narrow itself by passing a specific Property you desire it to Fire for on alternation. Pass 'BrickColor' as the specified property, and it'll Fire the Listener accordingly

local Part = workspace.Part

Part:GetPropertyChangedSignal("BrickColor"):Connect(function()
	print(Part.Name.."'s BrickColor changed!")
end)

Hope this helps! If so, forget to accept this answer! Have a nice day,

Feahren.

2 comments

0

It worked! Thanks!

0

You're welcome!

This discussion is preserved as it was. New answers, comments, and votes are closed.