So I made a leaderstats script and I want to access it into another script is this possible here is my code.
1 | game.Players.PlayerAdded:Connect( function (plr) |
2 | local ls = Instance.new( "Folder" ) |
3 | ls.Parent = plr |
4 | ls.Name = "leaderstats" |
5 | local Levels = Instance.new( "IntValue" ) |
6 | Levels.Parent = ls |
7 | Levels.Name = "Levels" |
8 | Levels.Value = 0 |
9 | end ) |
In other script refer to it as a leaderstats for example:
1 | Player:FindFirstChild( "leaderstats" ) |