Popular games like Jailbreak, Adopt Me, Mad City, and more have done live events. I was wondering how to do that (I’ve tried os.date() and UNIX). Could anybody help me?
You should try using messagingservice, it allows you to send a request to all servers. MessagingService | Documentation - Roblox Creator Hub
I’ve never used it can you explain how to?
I’m not the best at explaining but I’ll try my best ig. ![]()
Alright so, if you wanted for something to happen in all servers, for ex. a print. You could do something like this:
-- server script
local topic = "allservers"
local msg = game:GetService("MessagingService")
msg:SubscribeAsync(topic, function(message)
-- things that u want to happen
print(message.Data)
end)
…and to print the message you sent in all servers, you’d do something like:
-- developer console inside an alive server
local topic = "allservers"
local msg = game:GetService("MessagingService")
msg:PublishAsync(topic, "hello") -- the second argument is whats gonna be sent to all servers.
^ you’d have to run the code above in the developer console inside a server. (not studio)
I hope this helped, if it did please mark it as the solution. Thanks!
P.S. Here is a full wiki post about this: Cross-Server Messaging | Documentation - Roblox Creator Hub
How who I do a countdown to a date and then have something happen?
You’d have to mess around with os.time (sorry, i can’t give an example). Although, starting the live event by a developer via dev console is good enough imo.
Can you please explain why os.date didn’t work?
You need to use os.time() for this. I don’t see how messaging service will be of use here
Same, I don’t see how it is any easier or more useful than os.date or os.time.
To explain why os.date() did not work:
os.date is used for getting the date, not for doing countdowns. To do a countdown, you would need to use os.time() and subtract your result from the time you would like the live event would happen at
What if you only wanted to do a live event that only happened once, then surely os.date() and os.time() would work
I haven’t used os.date() or os.time() and I have found nothing to help on the internet.
You were right by using os.date() and os.time()
If you search up on google, “how to make a live event roblox” that should do the job.
I’m not going to spoonfeed you xD, so here are the resources you’d need (if you can’t figure it out using google)
- https://www.youtube.com/watch?v=uI6MIZ3Y7ZY (messaging service explained)
- How do i make a live countdown? - #3 by Conejin_Alt (making the actual countdown)
Let me know if you need more help!
I’ve tried this; https://youtu.be/WAyOuLWys1w but it does t seem to work
Follow the links I’ve send you ^^
I can’t now but I will later. Thanks for the help!