Is there a such thing as a .changed event for can collide? Like could I do
script.parent.CanCollide.Changed:Connect(cheker)
From my understanding it only works for things like inserted values. But if this is the case, what can I do instead?
Is there a such thing as a .changed event for can collide? Like could I do
script.parent.CanCollide.Changed:Connect(cheker)
From my understanding it only works for things like inserted values. But if this is the case, what can I do instead?
You’re looking for :GetPropertyChangedSignal()
, like so:
script.Parent:GetPropertyChangedSignal("CanCollide"):Connect(function()
print("yay")
end)
This is the API reference for this: Instance | Documentation - Roblox Creator Hub
Also, the .Changed
event only works for objects. You can’t call .Changed
on a property or attribute, it must be on the object. When the object changes, it will fire and you can determine what property changed.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.