function LeaderBoard(Fisherman) local leaderstats = Instance.new("Model") leaderstats.Name = "leaderstats" leaderstats.Parent = Fisherman
local money = Instance.new("IntValue")
money.Name = "Name"
money.Parent = leaderstats
money.Value = 10
end
game.Players.PlayerAdded:connect(LeaderBoard()
I have copied this code from one video but when i press start it says player is not valid member of model. What i should do or what i have done wrong?
The only problem I see with your code is when you tried to connect the PlayerAdded event. You have an open bracket that was left by itself inside the event Connection. I fixed that, however, I am not in ROBLOX studio right now so I cannot test this.
function LeaderBoard(Player) local leaderstats = Instance.new("Model") leaderstats.Name = "leaderstats" leaderstats.Parent = Player local money = Instance.new("IntValue") money.Name = "Name" money.Value = 10 money.Parent = leaderstats end game.Players.PlayerAdded:connect(LeaderBoard)