I'm trying to make a script where a message is sent once a player enters, that works, however when I added the function, it doesn't. It doesn't throw up any errors, just doesn't run. Please help? Thanks.
function onPlayerEntered() game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", { Text=("Welcome, "..game.Players.LocalPlayer.Name.."!"), Font = Enum.Font.SourceSans; }) end game.Players.PlayerAdded:connect(onPlayerEntered)
You are using a local script because of that you can not use onPlayerEntered. The solution is to place a localscript in the starterGui itself and add.
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", { Text = ("Welcome, "..game.Players.LocalPlayer.Name.."!"), Font = Enum.Font.SourceSans; }) --This is all you place in the localscript in the starterGui!
hope this helped! if it did please accept (maybe upvote) and your welcome. :D ~KIHeros