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
01game.Players.PlayerAdded:connect(function(Player) ----- When a Player joins a server this function happens
02    local Data = Instance.new("IntValue",Player) ----Makes an IntValue inside Player
03    Data.Name = "Data" -----It's name is Data ([Note]: You could change it to leaderstats if you would like a leaderboard with it.)
04    local XP = Instance.new("IntValue",Data) ----Makes a IntValue inside Data
05    XP.Name = "XP"
06    XP.Value = 0
07    local Level = Instance.new("IntValue",Data) ------- Makes an IntValue Inside Data
08    Level.Name = "Level" ------- It's name is Level
09    Level.Value = 1    
10    XP.Changed:connect(function() XPChange(Player,XP,Level) end) ---- To change the XP, XPChanged function occours
11 
12end)
13 
14function XPChange(Player,XP,Level) ------ XPChanged function
15    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)
16        XP.Value = 0 --- Resets the XP
17        Level.Value = Level.Value+ 1
18    end
19end
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