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

Stone doesn't run the clicking function when Player is holding a Pickaxe?

Asked by 6 years ago

Here's the script that was put in the stone


local function onMouseClick(player) if player.Character.WoodenPickaxe then script.Parent.Sound:Play() player.PlayerData:WaitForChild('Stone').Value = player.PlayerData:WaitForChild('Stone').Value + 10 end end script.Parent.Clicker.MouseClick:connect(onMouseClick)

The script runs when the player click it with bare hands but not when they're holding the pickaxe

0
try look for check for if it's equipt and not the pickaxe itself. "if player.Character.WoodenPickaxe.Equipped then" Venetrix 0 — 6y
0
No. if player.Character:FindFirstChild("WoodenPickaxe"). Also, you can't click clickdetectors with tools equipped. Programical 653 — 6y

Answer this question