So i have included these scripts and you can see how everything is built up in the screenshot
Explosion script that doesnt work:
local function onPartTouched(otherPart)
-- Get the other part's parent
local partParent = otherPart.Parent
print('Other Part Touched')
local delayTime = 0
local currentlyDelaying = false
script.Parent.Touched:connect(function(hit)
if currentlyDelaying == false then
local exp = Instance.new("Explosion", script.Parent)
exp.BlastPressure = 10
exp.BlastRadius = 4
exp.DestroyJointRadiusPercent = 1
exp.ExplosionType = Enum.ExplosionType.NoCraters
exp.Position = script.Parent.Position -
exp.Visible = true
currentlyDelaying = true
wait(delayTime)
currentlyDelaying = false
end
end)
end
Throwing script that doesnt work
local Speer = script.Parent.FireSpeer
script.parent.Equipped:Connect(function(Mouse)
Mouse.Button1Down:Connect(function()
Speer.Parent = workspace
end)
end)
end)
end)
Oh and i also dont know how to make the speer be thrown where the mice is aiming at, neither does it have any Acceleration (it should)
i want it to be an explosive Speer you can throw at cars, people and everything actually.
should explode when hitting anything
SCREENSHOT: