This script was meant to make the message "hi!!! (Player Name)" pop up in the chat whenever a player joins up, but for some reason it doesnt... Where did I fail
waitTime=15
function playerEntered(Player)
if Player ~= nil then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "Hii!!!" ..Player.Name.. "",
Color = Color3.new(0, 1, 1),
Font = Enum.Font.Arial,
FontSize = Enum.FontSize.Size24,
})
wait(waitTime)
end
end
game.Players.ChildAdded:connect(playerEntered)

2 comments
SetCore only works in LocalScripts
First off, doesn't make sense for you to use game.Players.ChildAdded when there's a PlayerAdded event. Second off, if this is a local script it will run locally and you can use game.Players.LocalPlayer.