Hello, so I have this script meant to do all the things in the following function, but it’s not working. It doesn’t even print “worked?”. There’s nothing wrong in the output, and I’ve even asked the AI and it is just sending my exact same code word for word again. The code is in a LocalScript if that changes anything. Any help?
local axemesh = script.Parent
local keysound = game.Workspace.keysound
local walldet = game.Workspace:WaitForChild(“clickingpart”):WaitForChild(“ClickDetector”)
local clickdet = axemesh:WaitForChild(“ClickDetector”)local function axecollect()
print(“worked?”)
task.wait()
keysound:Play()
task.wait()
walldet.MaxActivationDistance = 10
task.wait()
axemesh:Destroy()
endclickdet.MouseClick:Connect(axecollect)