So i am learning how to script and i look through free models to learn.. When looking through this free model, i dont understand how it works..
function OnPlayerEntered(player) if player.userId == game.CreatorId then --What does this mean? local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Text = "The creator has joined the server!" wait(2) msg:remove() elseif player:IsFriendsWith(game.CreatorId) then local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Text = "A friend of the creator has joined the server!" wait(2) msg:remove() elseif player:IsBestFriendsWith(game.CreatorId) then local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Text = "A best friend of the creator has joined the server!" wait(2) msg:remove() elseif player.Name == "builderman" or player.Name == "Telamon" or player.Name == "ROBLOX" or player.Name == "RobloShorty" or player.Name == "RobloSam" or player.Name == "RobloTim" or player.Name == "noob007" or player.Name == "MattDusek" or player.Name == "Matt Dusek" or player.Name == "clockwork" or player.Name == "jeditkacheff" or player.Name == "HotThoth" or player.Name == "Hotthoth" or player.Name == "hotthoth" or player.Name == "BrightEyes" or player.Name == "brighteyes" or player.Name == "Brighteyes" or player.Name == "erik.cassel" or player.Name == "ReeseMcBlox" or player.Name == "Madrak" then local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Text = "A ROBLOX admin has joined this server!" --Just somethin' neat. wait(2) msg:remove() end end game.Players.ChildAdded:connect(OnPlayerEntered)
Thanks!