I want to add a feature to my game that lets every player know when someone has joined the game.
I tried following this YT video ([How to make a Player Joined Chat Message in ROBLOX Studio - YouTube) and put the scripts in the right places and wrote the code exactly the same but when I enter the game nothing pops up in chat telling me I joined the game.
I searched for this topic but couldn’t find anything using the scripts im using.
Here’s the code and screenshots.
(PlayerJoinedScript under ServerScriptService)
local PlayerJoinedEvent = game.ReplicatedStorage.PlayerJoinedEvent
game.Players.Player.Added:Connect(function(Player)
PlayerJoinedEvent:FireAllClients(Player.Name)
end)
(PlayerJoinedScript under StarterPlayerScripts)
local PlayerJoinedEvent = game.ReplicatedStorage.PlayerJoinedEvent
PlayerJoinedEvent.OnClientEvent:Connect(function(Player)
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = Player.." has joined the game",
Font = Enum.Font.SourceSansBold,
TextSize = 24,
Color = Color3.new(0,1,0)
})
end)
Event
Could someone help me find the bug that’s causing my scripts not to work? I’ve been looking for around 20 minutes now and still don’t know what I did wrong.