Here’s the function :
if ismining == false then
if hit.Name == "Hitbox" or hit.Parent == "Rocks" then
ismining = true
if ismining == true then
ismining = false
canmine.Value = true
It seems to have an error but i dont know what’s the problem here.
Pickaxe hitbox :
Rock hitbox :
The ‘pickaxehitbox’ variable is referencing a Motor6D. You will have to change the declaration to the hitbox.
i don’t understand, earlier i tested it and it worked perfectly fine. And what do you mean by “changing the declaration to the hitbox”
how would i change the “declaration” to the hitbox
The hitbox is supposed to be a Basepart. You declared it as a motor6D
how would i change it?
( character requirement )
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.
but it is already referencing the actual pickaxe
Try naming the hitbox “PickaxeHitbox”, or change the name of the Motor6D. You probably have both the Motor6D and hitbox under the same name.
ty it works now! (character requirement)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.