Created
December 15, 2020 02:27
-
-
Save Quenty/0d777194939e2380f89ed109cbb7752e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local UserInputService = game:GetService("UserInputService") | |
local RunService = game:GetService("RunService") | |
local printRender = false | |
UserInputService.InputBegan:ConnectParallel(function(inputObject) | |
print("Running parallel (ConnectParallel) ", tick()) | |
printRender = true | |
end) | |
UserInputService.InputBegan:Connect(function(inputObject) | |
print("Running synchronious (Parallel)", tick()) | |
printRender = true | |
end) | |
UserInputService.InputBegan:ConnectParallel(function(inputObject) | |
printRender = true | |
task.synchronize() | |
printRender = true | |
print("Running synchronious (ConnectParallel, task.synchronize())", tick()) | |
end) | |
UserInputService.InputBegan:Connect(function(inputObject) | |
printRender = true | |
task.desynchronize() | |
printRender = true | |
print("Running parallel (task.desynchronize())", tick()) | |
end) | |
RunService.RenderStepped:Connect(function() | |
if printRender then | |
printRender = false | |
print("RenderStepped occured", tick()) | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment