Before, I used to have just one sword for everyone to use when they played in a match. But, recently I added more swords which players can purchase to upgrade. It seems like ever since I added that new feature my game has been failing a ton. Some players won't spawn in the match, some players don't even have a sword in the match, and others don't have leader stats for money!
I created a short video of my problems and the scripts which received the error message:
http://drive.google.com/file/d/1rA_i4K32Wd7OAZPcv9uLMcS0S3h-CdeI/view?usp=sharing
Why won't my players get there leader stats folder and their swords when they join the game?
BTW I am new to scripting so thanks!
If you think the problem is something else, and let me know.
Leaderstats has to be created by the server and placed into the player. When the player joins, YOU MUST use the server to CREATE the leaderstats.
game.Players.PlayerAdded:Connect(function(player) local ls = Instance.new("Folder") ls.Name = "leaderstats" ls.Parent = player local lsvalue = Instance.new("IntValue") -- Different value types can be used. lsvalue.Name = "Kills" lsvalue.Value = 1 -- IntValue requires a number. Use a string to enter text. lsvalue.Parent = ls end)