Currently whenever I press e it runs the script but I only want it to run when the tool is equipped
local tool = script.Parent
local uis = game:GetService("UserInputService")
local rs = game:GetService("ReplicatedStorage")
local Nogr = rs.nogr
tool.Equipped:Connect(function()
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
Nogr:FireServer()
end
end)
end)

1 comment
It works thanks But do you mind explaining what you did