How can I determine the time between two parts touching a stationary part?

  1. What do you want to achieve? Determine the time between two parts touching a stationary part which acts like a detector

  2. What is the issue? I can’t get the time between two parts touching a part that doesn’t move

  3. What solutions have you tried so far? Yes

I’ve tried a few things such as starting a int value timer and stopping it when the next object touches but it didn’t work as intended

Use tick()

Something like this

local lastTouched = tick()

detector.Touched:Connect(function(object)
    print("Time since last touched is ", tick() - lastTouched)
    lastTouched = tick()
end)