Incomplete statement: expected assignment or a function call

Hello I ran into this issue when I was making a game where whenever you click the “Make Video” button it gives you a random amount of subscribers (it was just a test btw) and it also has to add 1 to the videos made textlabel.

heres my code and my error

local BackgroundMusic = game.Workspace.Song
local Yay = game.Workspace.Goody
local Click = game.Workspace.Click
local CounterTxt = script.Parent.Parent.Parent.Cntr.countTxt
local videosmade = script.Parent.Parent.Parent.VidCntr.countTxt.Text
local videomadewnt = script.Parent.Parent.Parent.VidCntr.countTxt

videomadewnt.Text = videomadewnt.Value.Value
videomadewnt.Value.Value = 0

BackgroundMusic.Looped = true

	videomadewnt.Value.Value + 1

	CounterTxt.Text = (math.random(0, 100))
		script.Parent.Parent.Parent.madecntr.Visible = true
	script.Parent.Parent.Parent.madecntr.Visible = false


and heres my error:

please help im new AHHHHHHHHHHH

im not really i just suck AHHHHHHHHHHHHHHHHHHH

This is an incomplete statement and you need to put what you actually want here. Maybe you want this:

videomadewnt.Value.Value += 1
1 Like

it doesnt have an error in the output now, but it doesnt actually change the value at all.

Probably because it is in a LocalScript. Especially if you actually want the value to save to DataStores or use it for something else the server needs it to process, you need to add a RemoteEvent and add the value on the server.

1 Like

thank you so much! can you please add an example on what you mean though>?

1 Like

I just have one quick question, because I need it to know exactly what to give you back.

What exactly is this object

And is this a certain NumberValue or IntValue object, or is it something else? I think it’s an Int or NumberValue, but I could be wrong. Correct me if I am.