local tool = script.Parent
local handle = tool.Handle
local player = game.Players.LocalPlayer
local Character = player.Character
local model = game.Workspace

tool.Activated:connect(function()
for i, v in pairs(Character:GetChildren()) do
	if v:IsA("BasePart") and v.Name ~= 'HumanoidRootPart' then
		 v.Transparency = 0.5 
		  tool.Unequipped:connect(function()
           for i, v in pairs(model:GetChildren()) do
	          if v.Name == "Part" then
		         v.Transparency = 0
		         v.CanCollide = true
			
        end
       end
      end)
     end
    end
   end)


tool.Deactivated:connect(function()
	for i, v in pairs(Character:GetChildren()) do
		if v:IsA("BasePart") and v.Name ~= 'HumanoidRootPart' then
			v.Transparency = 0
		end
	end
end)

tool.Activated:connect(function()
for i, v in pairs(model:GetChildren()) do
	if v.Name == "Part" then
		v.Transparency = 0.5
		v.CanCollide = false
		handle.BrickColor = BrickColor.new("White")
		handle.Material = "Neon"
          tool.Deactivated:connect(function()
            for i, v in pairs(model:GetChildren()) do
	          if v.Name == "Part" then
				handle.Material = "Plastic"
		        v.Transparency = 0
	    	    v.CanCollide = true
	  
    	end
       end
      end)
     end
    end
   end)

This script only works inside studio but not the actual game.

5 comments

0

Did you use a local script or a script?

0

Yes

0

"yes" does not answer that question...

0

Is Filtering Enabled True?

0

Sorry, my english is not perfect. It is a local script and Filtering Enabled is off.