I was working on a game when suddenly my tool started giving an error
script:
local tool = script.Parent
local handle = tool.Handle --error here
local equiped = false
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local shootRemoteFunction = ReplicatedStorage.handPistoleShoot
tool.Equipped:Connect(function ()
equiped = true
end)
tool.Unequipped:Connect(function ()
equiped = false
end)
local function use(player)
local ray = Ray.new(handle.CFrame.p, handle.CFrame.LookVector*5000)
local BasePart, HitPosition, RayPosition, HitmaterialOrTerrain = workspace:FindPartOnRay(ray, player.Character)
shootRemoteFunction:InvokeServer(HitPosition, BasePart, tool)
end
tool.Activated:Connect(use)
end
the error i get is Handle is not a vallid member of Tool

2 comments
Do not make 2 questions, it just clutters up the site.
sorry i did not know it got posted