Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is the value of the NumberValue not changing / responding?

Asked by
xNypify 11
5 years ago

The Indicator value does not change, why? Also I am given no errors in the output.

local NameOfTrail = script.Parent.Parent.Parent.NameOfTrail
local RequiredPrice = script.Parent.Parent.Parent.RequirePriceText
local Indicator = script.Parent.Parent.Parent.BuyButton:WaitForChild("Indicator")
local player = game.Players.LocalPlayer
local Purchased = player:WaitForChild("RedTrail")

script.Parent.MouseButton1Click:Connect(function()
    NameOfTrail.Text = "Red Trail"
    Indicator.Value = 1 -- Indicator is set to 0 by default, and other buttons can also change it. *not working*
    if Purchased.Value == false then
    RequiredPrice.Text = script.Parent.Price.Value.." gem is required to purchase"
    else
    RequiredPrice.Text = "You own this trail"
    end
end)
0
if you are inside a textbutton imagebutton etc you should i use script.Parent.MouseButton1Down:Connect(function() PropzFx 27 — 5y
0
Click is not even a event ^^ PropzFx 27 — 5y
0
MouseButton1Click is an event, it triggers when both down and up happens on the left button aazkao 787 — 5y
0
Am I not using script.Parent.MouseButton1Click:Connect(function() correctly, also everything in the function works, just not the indicator part. xNypify 11 — 5y

Answer this question