I'm trying to make something that will Add 1 to the NumValue each time different buttons are pressed. (I'm working towards a till system) but it doesn't seem to work. There's no outputs. (I know all of the script.Parents are very in-efficient, But they do lead to the NumValue named Cost)
local cost = script.Parent.Parent.Parent.Parent.Cost
function onClick()
script.Parent.Parent.Parent.Parent.MainMenu.Cost.Value = script.Parent.Parent.Parent.Parent.MainMenu.Cost.Value + 1
end
script.Parent.MouseButton1Click:connect(onClick)

4 comments
Something with your Hierarchy must be off. For your MouseButton1Click, is the script.Parent leading towards a TextButton?
@Alpha, Indeed it does
Looks like you solved it? Was the problem Hierarchy or something else?
Yea it's fixed. I changed the NumberValue out for a IntValue and changed the place of it, Seemed to fix the issue :)