When I use .Changed on Model and after that remove some Parts from it (from the Model), the event doesn’t fire.
The code:
local Model = myModel
Model.Changed:Connect(function()
print(".Changed")
end)
Is there any event that fires when something (for example Part or Model’s property is changed)? If no, then how can I simulate it?
RatiusRat
(Boopmaster)
2
I’m sure you’re suppose to use part:GetPropertyChangedSiginal() for that.
This event only fires I believe, when a Property of the Model gets changed and not when a Part gets inserted or removed
To detect if you actually want to detect when a Part gets added or removed to a model. you can use the ChildAdded & ChildRemoved events:
local Model = myModel
Model.ChildAdded:Connect(function(Child)
print(Child)
end)
Model.ChildRemoved:Connect(function(Child)
print(Child)
end)
Actually, GetPropertyChangedSignal is if you want to listen for a specific property to be changed.
RatiusRat
(Boopmaster)
5
The OP questions if there is an event to detect if a property has been changed?
You are looking for ChildAdded and ChildRemoved events. Changed is only for properties you are parenting Instances to the model.
Well, that is the solution. I forgot that I can use these Events.