As gold said, for this you can use either :GetPropertyChangedSignal ()
or the Changed
event, and I'm sure that you can just use an if statment that checks if part.Position is == to the position that you want.
And to be honest i'd say that the best way (for me at least) to use the changed event. The paramater for this event, as guessed is the property that changed
01 | local part = workspace.Part. |
03 | part.Changed:Connect( function (prop) |
04 | if prop = = "Position" then |
05 | if part.Position = = Vector 3. new( 49 , 59 , 10 ) then |
06 | print (prop .. " changed to" .. tostring (part.Position)) |
I'm aware that :GetPropertyChangedSignal()
is more efficent but tbh i like it this way!