i have a problem with changing a value with my script, the script doesn’t seem to be changing the value everytime i equip the item ( pickaxe ), here’s the script :
local pickaxe = script.Parent
local pickvalue = game:GetService("ReplicatedStorage").Tool.CurrentPickaxe
pickaxe.Equipped:Connect(function()
pickvalue.Value = 1
print(pickvalue.Value)
end)
the script doesn’t seem to change the pick value, in the output the pickvalue doesn’t show up for some reason
can anyone help me?
Edit :
the value is used in another script if it might help
local replicatedstorage = game:GetService("ReplicatedStorage")
local mining = replicatedstorage.Mining
local health = script.Parent
local pickstrength = replicatedstorage.Tool.CurrentPickaxe.Value
local dc = replicatedstorage.DisableControl
local dc2 = replicatedstorage.dc2
local strength = game:GetService("ReplicatedStorage").Tool.CurrentPickaxe.Value
local currentpickaxe = game:GetService("ReplicatedStorage").Tool.CurrentPickaxe
currentpickaxe.Changed:Connect(function()
strength = currentpickaxe.Value
print("strength changed to "..strength)
end)