So this isn’t just an update button. In your 2nd script where did you get the value for cash. It just pops up out of the blue …
FireClient: player argument must be a Player object. Why does it say my argument has to be a player?
its in the table Stats like so
local Stats = {
Cash = 0,
Increase = 1
}
That’s in the other script … not the 2nd one where you’re using the reference.
That’s in the ServerScriptService script because I do not want people to have access to that
I know I can send the values back to the local script I just do not know how.
I get that (now) but you can’t just say cash out of the blue and it work in the 2nd script.
I guess I don’t understand what you’re doing …
That’s why the remote event but I am a bit unstable with remote events / functions. I am pretty unsure of how they interact together .
it’s just a trigger to set off the other script. it’s not going to shair values.
Oh so what would I have to use instead to send the values then? a return on the function?
If within that script you set a spot to set a #nunber value then use that #number value to refer to from both scripts. Like how you set up cash on a leaderboard.
a #number what is that I have never seen that is there a documentation link for that?
Click on add something to anything (the little plus) and type in number it will show you it.
cash = WhateverYOUnameIT.Value Then have both scripts talk to that to add or get the value.
What little plus where do you see that I am confused.
Do you know how to add a Bool value to a folder or object? It’s just like that but you use the Number.
I usually just write local bool = true/false never used that plus you are talking about
I also am not really good with OOP just reading the doc confuses more than anything and I haven’t had my classes for it yet I will next semester so at around January.
The plus is a symbol on the editor you see when pointing at something in the explorer side of the editor … it allows you to add things from it’s selection.
Like I said I just need to know where cash is at. Where are you storing that value.
ServerScriptService is where it is stored at.
Where on server side. (you don’t store stats server side) This should be stored in the players’ information like leaderstats
Isn’t leaderstats a folder in player though? It would give them access to the values going against what I am trying to do.