Attempt To Perform Arithmetic (add) On Instance And number

So I have been scripting so that when there is no player left on a basepart, it will make the basepart invisible, by that I made an int value to store how many players are on this basepart, but for some reason, I get this error:


when my script triggers, and the basepart does not appear whatsoever. Does anyone know how to fix this issue? Thank you for reading.

Here’s the script (feel free if you want to ask me more pictures of scripts):

And

Finally

What exactly are you trying to do here? FindFirstChild returns an Instance. If you’re trying to update the value, you’re supposed to do:

players.Value += 1

and

players.Value -= 1
1 Like

Well, your solution worked so thanks :slight_smile:. What I was trying to do was to store the amount of players on the basepart, if there is 0 players left on the basepart it will disappear, but when there is at least one player on there it will reappear.