Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how could I make this pickaxe script slowly delete every child in this model called "Rock"?

local tool = script.Parent
local head = tool.AxeHead
local stick = tool.Stick
local wielder = game.Players.LocalPlayer
local mouse = wielder:GetMouse()

tool.Activated:Connect(function(rock)
	print("wielder has selected" , mouse.Target)
	if mouse.Target.Parent.Name == "Rock" and mouse.Target.Parent:IsA("Model") then
		local rock = mouse.Target.Parent
		local rocks = rock:FindFirstChild("Part")
		while rocks ~= nil do
			rocks:Destroy()
			wait(.02)
		
		end
	end
end)

1 answer

Change line 11 to

local rocks = rock:FindFirstChild("Rock")

1 comment

0

-_- that wouldn't work

This discussion is preserved as it was. New answers, comments, and votes are closed.