I made a script that toggles a run for the character. I want the character to be UNABLE to equip tools while running = true. How can I do this?
Well the function for equipping tools is: .Equipped:connect(function() And make sure that you change running from a variable to a bool value so the scripts can communicate. Then, put a local script in the tool and write this.
local p = game.Players.LocalPlayer local pname = p.Name function equip(equipped) if --Put location of the running bool value here--.Value == true then for i, v in pairs(game.Workspace:GetChildren()) do if pname == v.Name then script.Parent.Parent = p.Backpack end end script.Parent.Equipped(equip)