I'm new in Roblox I don't know what I'm doing wrong,
Why do I get this error? attempt to index number with 'Value Script:
local milk = game.ReplicatedStorage.Milk
local price = 10
script.Parent.MouseButton1Click:Connect(function()
if milk >= price.Value then
milk = milk - price.Value
price = price.Value + 10
else
print("error")
end
end)
Why do I get this error? Value is not a valid member of LocalScript Script:
local price = script.Parent.Parent.BuyButton:FindFirstChild("shopSystem")
while true do
script.Parent.Parent.PriceText.Text = price.Value .. " Milk"
end
Thanks