gui script
local event = game.ReplicatedStorage.WarnSettings.WarnEvent local button = script.Parent.button local cd = false button.MouseButton1Click:Connect(function() if cd == false then cd = true event:FireServer(script.Parent.msg.Text) button.Text = "Warned in chat" wait(2) button.Text = "warn" cd = false end end)
STARTERPLAYERSCRIPT
game.ReplicatedStorage.WarnSettings.WarnEvent.OnClientEvent:Connect(function(message) if game.Chat:CanUserChatAsync(game.Players.LocalPlayer.UserId) then game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = message; Color = game.ReplicatedStorage.WarnSettings.WarnColor.Value; }) end end)
it wont do anything, no errors
https://gyazo.com/616d5af6e6282c358c23aadc4d8fe1e4https://gyazo.com/6e85a681169e7c88fa0a71f52941cd97 https://gyazo.com/13cf726efa9274aac08d8e90ff83e68b