- What do you want to achieve? Keep it simple and clear!
- System Message to be sent to all clients.
- What is the issue? Include screenshots / videos if possible!
- Well, it’s simple, no screenshots, it just sends to the person that sends it and not to the others.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
- Alot, none helped.
Here’s the client:
script.Parent.Parent.RunButton.MouseButton1Click:Connect(function()
if string.find(script.Parent.Parent.TextLabel.Text, "/sm") and script.Parent.Parent.More.Text ~= nil then
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.EVENTS.ServerNotification:FireServer(game.Players.LocalPlayer, script.Parent.Parent.More.Text, 4)
end
end)
Here’s the Server:
local Event = script.Parent.Parent.EVENTS.ServerNotification
Event.OnServerEvent:Connect(function(client, Player, Message, Duration)
local Notification = script.Parent.Parent.Other.ServerMessage
script.Parent.Parent.AUDIO.ServerNotification:Play()
Notification.PlayerIcon.Image = game.Players:GetUserThumbnailAsync(Player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)
Notification.PlayerIcon.PlayerName.Text = Player.Name
Notification.DeliveredBy.Text = "Sent by "..Player.Name
Notification.Message.Text = Message
game:GetService("TweenService"):Create(Notification.Message, TweenInfo.new(0.5), {TextTransparency = 0}):Play()
game:GetService("TweenService"):Create(Notification, TweenInfo.new(0.5), {BackgroundTransparency = 0.5}):Play()
game:GetService("TweenService"):Create(Notification.DeliveredBy, TweenInfo.new(0.5), {TextTransparency = 0}):Play()
game:GetService("TweenService"):Create(Notification.PlayerIcon.PlayerName, TweenInfo.new(0.5), {TextTransparency = 0}):Play()
game:GetService("TweenService"):Create(Notification.PlayerIcon, TweenInfo.new(0.5), {ImageTransparency = 0}):Play()
wait(Duration)
game:GetService("TweenService"):Create(Notification.Message, TweenInfo.new(0.5), {TextTransparency = 1}):Play()
game:GetService("TweenService"):Create(Notification, TweenInfo.new(0.5), {BackgroundTransparency = 1}):Play()
game:GetService("TweenService"):Create(Notification.DeliveredBy, TweenInfo.new(0.5), {TextTransparency = 1}):Play()
game:GetService("TweenService"):Create(Notification.PlayerIcon.PlayerName, TweenInfo.new(0.5), {TextTransparency =1}):Play()
game:GetService("TweenService"):Create(Notification.PlayerIcon, TweenInfo.new(0.5), {ImageTransparency = 1}):Play()
end)