Title is pretty self explanatory. Tool.Equipped == true when the tool isnt equipped. Why is this happening?
Here is my code:
local Tool = script.Parent local UserInputService = game:GetService("UserInputService") local keyHeld = false function holdTool(input,wasProcessed) keyHeld = true while UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) == true and keyHeld do local bodyPosition = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position local flyingBit = Instance.new("Part",workspace.Flying_Pieces) flyingBit.Shape = Enum.PartType.Ball flyingBit.Anchored = true flyingBit.Transparency = 0.5 flyingBit.BrickColor = BrickColor.new(23) flyingBit.Material = Enum.Material.SmoothPlastic flyingBit.Size = Vector3.new(7,1,7) flyingBit.CFrame = CFrame.new(bodyPosition.X,bodyPosition.Y-3.5,bodyPosition.Z) wait(0.1) for _, item in ipairs(workspace.Flying_Pieces:GetChildren()) do game:GetService("Debris"):AddItem(item, 1) end end end if Tool.Equipped then print("Enabled") UserInputService.InputBegan:Connect(holdTool) else print("Disabled") end
gif of issue: https://gyazo.com/003ffc590d2b6996905b7da29643a1eb