Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

When I publish my game to roblox it says script will won't be published?

Asked by 5 years ago

I have leaderstats in the game but when I test in studio they are there and when I go to my game they are not, Could the reason be because the error message and how do I fix

0
What is the error message? User#32819 0 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
01game.Players.PlayerAdded:Connect(function(player)
02    local leaderstats = Instance.new("Folder", player)
03    leaderstats.Name = "leaderstats"
04 
05    local Lvl = Instance.new("NumberValue", leaderstats)
06    Lvl.Name = "Level"
07    Lvl.Value = 1
08 
09    local EXP = Instance.new("NumberValue", leaderstats)
10    EXP.Name = "EXP"
11 
12    local MaxEXP = Instance.new("IntValue", leaderstats)
13    MaxEXP.Name = "MaxExp"
14    MaxEXP.Value = 100 * (Lvl.Value / 2)
15 
View all 29 lines...
Ad

Answer this question