So, I’m making a small game, then I want to make it so that if the owner joins, it will display a message in the ChatBox
After I understand a bit of code and put it in StarterPlayerScript, then I run the game, there is no error in the output, but the code doesn’t work
This is my code, should I use RemoteEvents? or is there another way?
local ownid = 603603461
game.Players.PlayerAdded:Connect(function(plr)
if plr.UserId == ownid then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "T";
})
end
end)
Use a server script and whenever player is added, check if it equals to your owner id, then use a Remote Event and fire all the clients RemoteEvent:FireAllClients(); then make a localscript and listen for the remote event to be fired.