This tool makes the player noclip when they equip the tool. I don't know I would stop these functions when the player unequips the tool because there are RunService and on change functions. When I unequip the tool, the script would still run because it's in a loop.
wait(2)
nam = game.Players.LocalPlayer.Name
local tool = script.Parent
local function onEquip()
game:GetService('RunService').Stepped:connect(function()
workspace[nam].Torso.CanCollide = false
workspace[nam].Head.CanCollide = false
end)
workspace[nam].Torso.Changed:connect(function()
workspace[nam].Torso.CanCollide = false
workspace[nam].Head.CanCollide = false
end)
for a,b in pairs(workspace[nam]:GetChildren()) do
if b:FindFirstChild("Handle") then
b.Handle.CanCollide = false
end
end
end
local function onUnequip()
--???
end
tool.Equipped:connect(onEquip)
tool.Unequipped:connect(onUnequip)
