I’m trying to add an admin command system into my game but I have multiple errors where some lines refuse to comment out and this single event delays my entire script.
I did print(player.UserId,game.Creator) before the entire line of code but nothing happened.
Some of the lines are refusing to comment out because of the other double brackets within your print statement which are intended for indexing but are registered as the end of a multi-line string.
You mentioned a ‘single event’ causing delays, I don’t really understand. Can you explain what this event is, as well as provide some more context and code?
local MessagingService = game:GetService("MessagingService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Signals = ReplicatedStorage.Signals
local Remotes = Signals.Remotes
local GLOBAL_TOPIC = "SHOUT"
MessagingService:SubscribeAsync(GLOBAL_TOPIC,function(message)
Remotes.ToClient:FireAllClients(GLOBAL_TOPIC,message.Data)
end)
local Commands = {}
Commands.announce = function(messageData)
MessagingService:PublishAsync(GLOBAL_TOPIC,messageData[2])
end
return Commands
Also I deleted the print statement and its still happening.
Oh yeahh, I didn’t see that. The player.Chatted event still doesn’t fire for some reason and I realized its because it can’t be used on server. I’m gonna swap to client and use TextChatService.
Nevermind it can be used on server, its just not working.