local tool = script.Parent local handle = tool.Handle local Player = game.Players.LocalPlayer local mouse = Player:GetMouse() local at = 2 tool.Activated:Connect(function() --WEAPON EFFECT local expo = Instance.new("Explosion", workspace) expo.Position = mouse.Hit wait(at) expo:Destroy() end)
I tried to do something but it is now broken.
the handle of the tool is not loaded yet so you get an error saying Handle is not a vaild member of Tool and you should say the mouse position like this:
local tool = script.Parent local handle = tool:WaitForChild("Handle") local Player = game.Players.LocalPlayer local mouse = Player:GetMouse() local at = 2 tool.Activated:Connect(function() --WEAPON EFFECT local expo = Instance.new("Explosion", workspace) expo.Position = mouse.Hit.Position wait(at) expo:Destroy() end)
the handle of the tool is not loaded yet so you get an error saying Handle is not a vaild member of Tool and you should say the mouse position like this:
local tool = script.Parent local handle = tool:WaitForChild("Handle") local Player = game.Players.LocalPlayer local mouse = Player:GetMouse() local at = 2 tool.Activated:Connect(function() --WEAPON EFFECT local expo = Instance.new("Explosion", workspace) expo.Position = mouse.Hit.Position wait(at) expo:Destroy() end)