If I were to have a server script function that runs coroutine.wrap every time let’s say a proximity prompt is fired. Would that function create multiple threads?
For example: 2 players activate a proximity prompt at once
blahblah.ProximityPrompt.Triggered:Connect(function(player)
print(player)
end)
--> Player1?
--> Player2?
OR
--> Player1 or Player2? (Same as no coroutines)
Coroutines run on a separate thread from the main one, so for example if it fails it won’t yield the main thread 2 separate codes can run at the same time