can someone help with making roblox scripts only work when a certain tool is equipped?
01 | local Player = game:GetService( "Players" ).LocalPlayer |
03 | local rp = game:GetService( "ReplicatedStorage" ) |
04 | local Combat = rp:WaitForChild( "Combat" ) |
06 | local UIS = game:GetService( "UserInputService" ) |
17 | if script.Parent.Equipped:Connect( function () |
21 | script.Parent.Unequipped:Connect( function () |
25 | UIS.InputBegan:Connect( function (input,isTyping) |
28 | elseif Equipped and input.UserInputType = = Enum.UserInputType.MouseButton 1 then |
29 | if debounce = = false then |
33 | local passedTime = currTime - prevTime |
34 | if passedTime < 1 then |
45 | Combat:FireServer(count) |
51 | Combat.OnClientEvent:Connect( function () |
I'm trying to get this script to only activate when i have a certain tool equipped help please i already have some code to try to get this to work but it doesn't.