function Signal.Wait(s)local k=coroutine.running()local r local z=false r=s:Connect(function(...)if z then return end z=true r:Disconnect()task.spawn(k,...)end)return coroutine.yield()end

function Signal:Wait()
	local waitingCoroutine = coroutine.running()
	local connection
	local done = false
	connection = self:Connect(function(...)
		if done then
			return
		end
		done = true
		connection:Disconnect()
		task.spawn(waitingCoroutine, ...)
	end)
	return coroutine.yield()
end
