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

How can I make a RemoteEvent Live Event happen across all servers?

I have a game that has Live events, but I have been trying to get the events to happen on every server, for context, I use RemoteEvents and ScreenGuis to make the Events happen, below is the code I use for the ScreenGui and the parts in the event

function onClick()
	game.ReplicatedStorage.Eventpartname:FireServer()
end

script.Parent.MouseButton1Click:Connect (onClick)
game.ReplicatedStorage.Eventpart.OnServerEvent:Connect(function(player)
	script.Parent.Transparency = 0
	game.Workspace.Blasting:Play()
	script.Parent.Attachment.ParticleEmitter:Emit(5000)
end)

If I can make the Event happen across all servers, what script could I use, and how?

1 answer

✓ Accepted answer

You could use os.date and use UTC instead of Local Time and check if that time is equal to the specified time.

local eventTimeH = "12"
local eventTimeM = "00"

while wait() do
	if os.date("!*t").hour == eventTimeH then
		if os.date("!*t").min == eventTimeM then
			break
		end
	end
end

print("Event Is Happening!")

You can also add onto that using MessagingService to add extra pizzazz if you wanted, as this will send a message to all servers using PublishAsync() and the servers will receive the messages using SubscribeAsync().

Hope this helped! Feel free to select this as an answer if this helped you!


MessagingService

OS

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