I'm trying to make a grapple tool, simple as it can get.

while true do
	if script.Parent.Parent.Weld == true then
		script.Parent.Anchored = true
	else
		script.Parent.Anchored = false
	end
wait()
end

For some reason, when I activate the script

local tool = script.Parent
local enabled = script.Parent.Weld

function toolActivated()
    enabled.Value = not enabled.Value
end
 
tool.Activated:Connect(toolActivated)

It doesn't do ANYTHING, both are normal scripts. Not module nor local. Help?

EDIT: No need for anymore help, I found an alternative.