I want to, as the title says, delay the time it takes the remote function to return a value without yielding the existing code. How would I go about this and is it even possible?
My remote function is fired from the server and waits for a response from the client.
Example code:
local event -- my event
event.OnClientEvent:Connect(function(timeToWait))
-- use something to wait that doesn't yield the code
return true
end)
Feel free to ask for details. Thanks for your help!
local event -- my event
event.OnClientEvent:Connect(function(timeToWait)
spawn(function()
task.wait(timeToWait)
return true
end)
--// do whatever you want here
end)