so i was making an overhead GUI script and it says that PlayerAdded isnt a valid member of datamodel. can someone help? here is the code
local rank = game:GetService("ReplicatedStorage").BillboardGui game.PlayerAdded:Connect(function(plr) repeat wait() until plr.CharacterAdded local c = rank:Clone() c.OverheadText.Text = "Adventurer" c.Parent = workspace:FindFirstChild(plr.Name).Head end)
--Inside a server script local rank = game.ReplicatedStorage:FindFirstChild("BillboardGui") -- Define BBGui game.Players.PlayerAdded:Connect(function(player) -- PlayerAdded is an RBXScriptSignal called from game.Players. game.PlayerAdded isn't correct. player.CharacterAdded:Connect(function(character) -- Wait for players character so the gui will be inserted back after they die if rank ~= nil then local c = rank:Clone() c.Parent = character.Head c.Adornee = character.Head -- You must set the adornee of a BillBoardGui. Adornee is what part the Gui is displayed on. You can parent the gui in workspace and adornee it to a players head and it will still work. end end) end) --This will get every player that joins the server, waits for each time the players character spawns, and then creates a new gui for that players head.