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.
01 | function LeaderBoard(Player) |
02 | local leaderstats = Instance.new( "Model" ) |
03 | leaderstats.Name = "leaderstats" |
04 | leaderstats.Parent = Player |
05 | local money = Instance.new( "IntValue" ) |
06 | money.Name = "Name" |
07 | money.Value = 10 |
08 | money.Parent = leaderstats |
09 | end |
10 |
11 | game.Players.PlayerAdded:connect(LeaderBoard) |