No errors. Only works in test mode. Nothing happens in Play mode.
can = true
function click()
if can == true then can = false
local player = game.Players:FindFirstChild(script.Parent.Parent.Parent.Name)
local mouse = player:GetMouse()
if (player.Character.Torso.Position - mouse.Hit.p).magnitude < 100 then
script.Parent.Parent.Handle.Blast:Play()
e = Instance.new("Explosion")
e.BlastRadius = 10
e.Position = mouse.Hit.p
e.Parent = workspace
wait(5)
end
can = true
end
end
script.Parent.Parent.Activated:connect(click)
just a siggy in its natural habitat |