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
How does one get something to fire when the position is at a certain point?
1 answer
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!
2 comments
Sorry if my answer is weird looking im wrote this on a phone, and if you're wondering whats tostring for its prety much a function that changes any value to a string. its really helpful but not a difference if youre printing
oh boi 2 upvotes ty
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
you could use instance's GetPropertyChangedSignal(property) and connect it to your function https://developer.roblox.com/api-reference/function/Instance/GetPropertyChangedSignal