local tool = script.Parent
local function explode(point)
local e = Instance.new("Explosion")
e.DestroyJointRadiusPercent = 0
e.Position = point
e.Parent = workspace
end
local function onActivated()
local human = tool.Parent.Humanoid
explode(human.TargetPoint)
end
tool.Activated:Connect(onActivated)
e.Position = point
I’m looking at the tool Dev Hub post just to learn more about tools. But why would they set the explosions position to “point.”
Why is it called point? It is not necessary to always use that name, in most cases, the name of the variable/argument does not matter, if that is not your question, explain a little more.
From what I’m reading, it uses Humanoid.TargetPoint, which at this point is discontinued. Basically, it takes the last position that a player clicked with on a tool. Using this, they explode the point where they clicked, and they pass said point in the explode function. You can read more about it below:
Thanks a lot lmao. And potato I didn’t know it was discontinued because I don’t even know why they will still have that as an example. But, thanks a lot.