Well, you would need to request the pastebin like every x seconds. The request data won’t auto-update.
yeah i’ll keep that in mind, but as i said, i want to make other things with the http service, not just an announcement.
What exactly is it you want to do when you say “other things”?
HttpService has it’s limits. You would need to keep and eye on it so you don’t exceed the limits.
We are having hard times understanding what you mean. Please explain what you want the script to do, in general so we are aware and we can help you, currently you are not telling us anything but a header, and using pastebin which is not really reliable.
Other options that have been provided, thus being.
- Firebase
- Messaging Service (main purpose, literally is the reason of it)
Firebase documentation,
here
Messaging service,
here
Looks like that’s not the problem, i’ve created a new paste and i’m still getting the same error
change the live event timer in real time withouth update or shutdown the game.
Why are you putting variables inside a while wait() do
, put the variables ABOVE.
First of all, please do not use a while wait() loop to make get requests, you will crush the http request limit within seconds.
Also give me a second, i will give you an example of how this should be done.
So the Data from the URL can be updated without disable the script.
Alright, thank you so much!!!.
Ohhh, let me see. What is the limit?
Okay, something you need to learn. Mostly variables will not work ESPECIALLY not httpservices, if they are inside a loop. From my knowledge this causes script to crash.
Please utilize the information your gathering to your advantage, thus being not using while wait() do, that will exceed HTTPSERVICE’s requests.
Ok, thank you, can you wait a bit so i can test without the loop?
Actually, everything will work inside the loop. Just it would exceed the limits.
Alright! thank you so much man! let me try again.
You could try using the pastebin API to retrieve the post. You can’t just do the URL to the post, because Roblox isn’t logged in to your pastebin account, and your pastebin isn’t public or unlisted. It might be more reliable using an API key as it could be that you’re running into a limit of some sort.
You can read about the API here:
Edit: Updated - I thought the bin was not public.
Speaking of 403 errors i was trying to reply and got a 403 error.
Anyway, here is a working example. I still think you should use another solution like MessagingService though:
local HttpService = game:GetService("HttpService")
local URL = "https://pastebin.com/raw/Ber30YMY"
while true do
local success, result = pcall(HttpService.GetAsync, HttpService, URL) --Always use pcall if there is a possibility of an error
if success then
--It worked, result is going to be the data of the site
print(result)
else
warn("Error caught: " .. result) --Since something went wrong, result will instead contain information about the error
end
task.wait(7.5) --Don't spam requests, it will rate limit you within seconds.
end