This script is suppose to add 1 to a NumberValue when clicked IF the value is less than 11, but there are no errors or anything for that matter in the output and it doesn't work. Whats wrong?
-- Made by AwsomeSpongebob
HairVal = game.Workspace.Dummy.Hair.Value.Value
Button = script.Parent
Button.MouseButton1Click:connect(function()
if HairVal < 11 then
HairVal = HairVal + 1
end
end)
P.S. Dummy and Hair are both models, there is a numbervalue located inside the Hair model.

1 comment
Try changing the name of the numbervalue. There is 2 "Value" on line 3.