Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

RenderStepped with a wait?

I'm sending an Http Request and I want it to be sent every second. however since I'm not sure how to use render stepped with a wait() I can't accomplish this. I would use while wait() do but that's not an option since i'm sending a http request constantly but I need to put in an OAuth Token after the script is executed so it will give an error and break the script. Have any ideas?

Nevermind I figured out the pcall return.

1 answer

✓ Accepted answer

You can simply allocate the RBXScriptSignal and use the :Wait() method, or you can embed the request within the event.

local runService = game:GetService("RunService")
local rStepped = runService.RenderStepped

while rStepped:Wait() do

end

local runService = game:GetService("RunService")

runService.RenderStepped:Connect(function()
	
end)

6 comments

0

I still get the same error, 'attempt to concatenate string with nil' as if I were to use while wait() do.

0

I would use a pcall() but I need to get a return, unless is that possible?

0

You can do that, show me your code so I can help.

0

I added my code to the post

0

I figured out the pcall return. kinda weird how you dont use parenthesis for the function but it works, thanks :)

0

Ah! Alright, great!

This discussion is preserved as it was. New answers, comments, and votes are closed.