game:GetService("StarterGui"):SetCore("SendNotification",{ Text = "test"; Title = "test"; Color = Color3.new(0,1,1) })
So I've been told that SendNotification is an API, but it hasn't been developed yet.
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = "Welcome, "..player.Name.."."; Color = Color3.new(0,1,1) })
However, there is ChatMakeSystemMessage, which is working. The problem I am running into is that I want it to display globally, meaning that every user can see the message, rather than just the LocalPlayer.
For those of you who don't know, the script has to be a LocalScript & located in the StarterGui. Help would be appreciated.
I would use RemoteEvents for this. When you have a RemoteEvent all you do is call FireAllClients() and the same thing happens to everyone.
LocalScript in StarterGui:
local plr = game.Players.LocalPlayer local RE = Instance.new("RemoteEvent", game.ReplicatedStorage) RE.Name = "Chat" RE.OnClientEvent:connect(function(msg, color) game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", { Text = msg or "Hello, world!"; Color = color or Color3.new(0, 1, 1) }) end)
Script in ServerScriptService:
local RE = game.ReplicatedStorage:WaitForChild("Chat") -- welcome message game.Players.PlayerAdded:connect(function(plr) RE:FireAllClients(plr.Name.." has joined the server.", Color3.new(0, 1, 0)); end) game.Players.PlayerRemoving:connect(function(plr) RE:FireAllClients(plr.Name.." has left the server.", Color3.new(1, 0, 0); end) -- general information messages local info = {"fav the game!", "thumb up the game pls!", "follow my twitter!"} while true do for i,v in next, info do RE:FireAllClients(v, Color3.new(BrickColor.Random().Color)) wait(15) end end
This method might be a bit barbarian, but it should work:
Put a StringValue named "Chat" in Workspace. Put this LocalScript in every Player.
ChatValue = game.Workspace.Chat Chat.Changed:connect(function(property) game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", { Text = Chat.Value; Color = color or Color3.new(0, 1, 1)}) end)
And then have this Script in workspace too:
game.Players.PlayerAdded:connect(function(player) game.Workspace.Chat.Value = "Welcome, "..player.Name end)
I might have made me a mistake, if so, please contact me. If you'd need any further explanation, feel free to contact me too.
P.S. Please UpVote, so I can Upvote others! (I don't have 5 Rep yet)