pickaxehitbox.Touched:Connect(function(hit)
if ismining == false then
if hit.Name == "Hitbox" or hit.Parent == "Rocks" then
print("mining")
ismining = true
if ismining == true then
wait(1)
ismining = false
end
end
end
end)
task.wait(1)
canmine.Value = true
end
end)
It seems to have an error but i dont know what’s the problem here.
He means change the variable. If pickaxehitbox is referenced to “MyModel.PickAxeMotor6D” for example, then you’d want to change the variable to “MyModel.ActualPickAxe” for another example.
local Tool = script.Parent
local Pickaxehitbox = Pickaxe.Pickaxepart.Hitbox -- Motor6D.
-- Since it's a Motor6D, then I'd want to change it to...
local Pickaxehitbox = Pickaxe.Pickaxepart.Axe
If the Motor6D is also named Hitbox, then the script will think the hitbox is a Motor6D.