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 7 years ago

Here's the script that was put in the stone

1local function onMouseClick(player)
2 
3    if player.Character.WoodenPickaxe then
4        script.Parent.Sound:Play()
5        player.PlayerData:WaitForChild('Stone').Value = player.PlayerData:WaitForChild('Stone').Value + 10
6    end
7 
8end
9script.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 — 7y
0
No. if player.Character:FindFirstChild("WoodenPickaxe"). Also, you can't click clickdetectors with tools equipped. Programical 653 — 7y

Answer this question