So for example lets say I put wait(5) and then a part a normal part changed position to 49,59,10 and i wanted a event to fire when it became 49,59,10 does anyone know what i need to do to make a event or something fire when the position becomes 49,59,10
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
local part = workspace.Part. -- or wherever is your part part.Changed:Connect(function(prop) if prop == "Position" then -- we checked if the position was changed if part.Position == Vector3.new(49, 59, 10) then -- then we checked if the position changed to the position we wanted print(prop .. " changed to" .. tostring(part.Position)) -- and put what you want to be fired here end end end)
I'm aware that :GetPropertyChangedSignal()
is more efficent but tbh i like it this way!