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

How do I make this FE Compatible?

Asked by 7 years ago
Edited 7 years ago
game.Players.PlayerAdded:connect(function(Player) ----- When a Player joins a server this function happens
    local Data = Instance.new("IntValue",Player) ----Makes an IntValue inside Player
    Data.Name = "Data" -----It's name is Data ([Note]: You could change it to leaderstats if you would like a leaderboard with it.)
    local XP = Instance.new("IntValue",Data) ----Makes a IntValue inside Data
    XP.Name = "XP" 
    XP.Value = 0
    local Level = Instance.new("IntValue",Data) ------- Makes an IntValue Inside Data
    Level.Name = "Level" ------- It's name is Level
    Level.Value = 1     
    XP.Changed:connect(function() XPChange(Player,XP,Level) end) ---- To change the XP, XPChanged function occours

end)

function XPChange(Player,XP,Level) ------ XPChanged function
    if XP.Value >= Level.Value*150  then ----- this function occours happens if the Level's Value is greater or equal to this 150 ([Note]: Change 150 to the max XP)
        XP.Value = 0 --- Resets the XP
        Level.Value = Level.Value+ 1
    end
end
1
What makes me angry is because the reason why people use connect instead of Connect connect is depricated and it can only work in roblox studio but not in the released game I always recommend Connect instead of connect saSlol2436 716 — 7y
0
Why you made the .PlayerAdded function in a LocalScript? Ziruken 139 — 7y
0
Its not a local script Bryson467 12 — 7y

1 answer

Log in to vote
0
Answered by
Asceylos 562 Moderation Voter
7 years ago

By just making it a global script. There is no reason why it should be local.

0
It is, but its because of Filtering Enabled it will not work. so it works in studio but not when I play the actual game. Bryson467 12 — 7y
Ad

Answer this question