Server Message Bug

  1. What do you want to achieve? Keep it simple and clear!
  • System Message to be sent to all clients.
  1. 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.
  1. 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)
1 Like

Can I see your explorer layout?

I’m assuming that you’re trying to make a GUI show up when it is called? If so, you shouldn’t need a bunch of code on the server. Just filter the text then FireAllClients on another remote, and back on the clientside you can do the tweenservice stuff.

Also I would highly reccomend you store things like script.Parent.Parent.Parent.Parent.Parent.Parent.Parent and game:GetService("TweenService") in variables instead of repeating the same text over and over again.

2 Likes

Doesn’t work, i’ve tried everything.

I may need to see the explorer layout to understand where and what the different parts are.

1 Like