This is my script:
local button = script.Parent
local player = game:GetService("Players").LocalPlayer
button.MouseButton1Click:Connect(function()
local currentool = player.Backpack:FindFirstChildWhichIsA('Tool')
currentool.Enabled = true
end)
everytime i click the button it comes out with the error "Players.whyjustwhyf.PlayerGui.ScreenGui.TextButton.LocalScript:6: attempt to index nil with 'Enabled'"
How do i fix it??