What is
ApplesCollected
Character Limit
What is
ApplesCollected
Character Limit
Already, check the screenshots and as you can see it works.
appleAmount = 15, from server script you can check it (30 crs)âŚ
I meant to say
applesCollected
sorry
You donât return in the addApple function so it returns just nil
True this might be the issue good eye
I donât think itâs the problem of applesCollected since the print works the same, all values and etc, the thing is I canât get how to add or do - from modules, since if I just use plr.Apples.Value = module.addApple(15,appleValue) it works without any errors which is weird.
I tried do it also, still the same error which is insane.
Mb, didnât see that
Could it be possible that you may be creating the Values on the client instead? And the server wouldnât be unable to detect them that way perhaps?
I never would do this weird mistake. Everything is based of module and server side only.
Do you still get the error if you call the module like this:
module.addApple(appleAmount, 15)
It will be the diff error such as: Number canât get value(thatâs why I said before the module checking everything and it canât be the issue)
I dont think you have to have this line of code if appleAmount ~= nil and appleValue ~= nil then
What if you try removing the .Value from this:
local remainingApple = appleValue.Value + appleValue
And just call the module with: module.addApple(appleAmount, appleValue.Value)
Itâs in the same time funny and makes me confused, if I just do for example:
plr.Apples.Value = module.addApple(15, appleValue) ITS WORKS but then how it will add the X value?
So then we should do: plr.Apples.Value += but if we do it then the error appears.
Itâs checking if I forgot to add something then it will print me âappleAmount nilâ or âappleValue = nilâ
What are you using AppleAmont for as your adding appleValue.Value with appleValue
Here:
local remainingApple = appleValue.Value + appleValue
Still the same error, so I believe is module script works pretty good and it canât make any issue which is makes me sick, so the mainly problem is on server side and I donât know whatâs wrong with it.
Not sure what else the issue could be then
A place file to reproduce it could be helpful, otherwise Iâm unsure on where the error may lie