Hello ,
I am trying to make my game to display a welcome message in the game chat with this code:
local Event = game:GetService("ReplicatedStorage"):WaitForChild("PlayerJoined")
local PlayerService = game:GetService("Players")
Event.OnClientEvent:Connect(function(plr, CountryName)
print("Test")
game.StarterGui:SetCore("ChatMakeSystemMessage",{
Text = "Welcome Bot: Hello " .. plr.DisplayName,
Color = Color3.new(0, 1, 0.498039),
Font = Enum.Font.SciFi,
TextSize = 18,
})
end)
However when it runs it prints βTestβ with no errors, but then nothing in chat.
Any help is appreciated!
Noah
May 21, 2023, 8:45pm
2
Is the event PlayerJoined being fired?
I have this code in serverscriptservice
local PlayerService = game:GetService("Players")
local Event = game:GetService("ReplicatedStorage"):WaitForChild("PlayerJoined")
PlayerService.PlayerAdded:Connect(function(plr)
Event:FireAllClients(plr)
end)
Noah
May 22, 2023, 10:34pm
4
This function may be firing before the player joins, check that the player is fully loaded in before you send the request or check from the local script.
1 Like
system
Closed
May 29, 2023, 10:35pm
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.