Hello there, I’m making a feature that when you say /ShowBanned a Banning System will say back in my channel either the banned player or, there are no banned players.
My issue is, I cannot find out how to make a script to say something in a certain channel.
If you can find a solution, it would be very appreciated.
Heres my script :
local DS = game:GetService("DataStoreService"):GetDataStore("Ban")
local BannedPlayers = {}
local Channel = "ModCommands"
game.Players.PlayerAdded:Connect(function(players)
players.Chatted:Connect(function(msg)
if msg == "/ShowBanned" then
BannedPlayers = game:GetService("HttpService"):JSONDecode(DS:GetAsync("ban"))
for PlayerID,message in pairs(BannedPlayers) do
local Player, Message = unpack((message):split(";"))
wait(0.2)
local BannedSay = "Player = "..Player..", PlayerId (For unbanning) = "..PlayerID..", Reason = "..Message
--here is where i would like it to say my "BannedSay" and i would also like it to say it in dark red because someone is banned
end
if (next(BannedPlayers) == nil) then
wait(0.2)
local NoBannedSay = "There are no banned players at the moment, You can ban someone by saying /ban (Player);(Reason)"
--here is where i would like it to say my "NoBannedSay" and i would also like it to say it in white
end
end
end)
end)