I don't Know Why I'm Getting These Errors?
I'm trying to make it so that when the game ends, you get experience and money, and if you have a certain amount of experience you level up. Here are the errors I'm getting:
15:53:01.492 - Experience is not a valid member of IntValue
15:53:01.492 - Script 'Workspace.lvlDealer', Line 3
15:53:01.493 - Stack End
15:53:02.499 - Points is not a valid member of IntValue
15:53:02.500 - Script 'Workspace.dealer', Line 5
15:53:02.501 - Stack End
Here is my scripts.
lvl dealer script:
01 | game.Players.PlayerAdded:connect( function (plr) |
03 | local e = plr.leaderstats.Experience |
04 | local l = plr.leaderstats.Level |
05 | local ml = plr.leaderstats.Level.MaxLevel |
06 | local en = plr.leaderstats.Experience.ExperienceNeeded |
07 | if e.Value > = en.Value then |
09 | e.Value = e.Value - en.Value |
10 | en.Value = en.Value* 1.10409 |
12 | if l.Value = = ml.Value then |
dealer script:
01 | local gt = game.Workspace.gameRunner.gameTime |
03 | game.Players.PlayerAdded:connect( function (plr) |
05 | local p = plr.leaderstats.Points |
06 | local m = plr.leaderstats.Money |
07 | local e = plr.leaderstats.Experience |
08 | if gt.Value = = 1 and Debounce = = false then |
10 | m.Value = m.Value + p.Value/ 2 |
11 | e.Value = e.Value + p.Value |
12 | p.Value = p.Value - p.Value |
Thank you! It would be great if somebody could answer this :)