wait()

local Tool = script.Parent
local Handle = script.Parent.Handle
local player = game.Players.LocalPlayer
local Character = player.Character
local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=165969964"
sound.Parent = script.Parent




Tool.Activated:connect(function()
	sound:play()
	
	local weld = Instance.new("Weld")
	weld.Part0 = Handle
	weld.C0 = Handle.CFrame:inverse()
	local explosion = Instance.new("Explosion")
	      explosion.Parent = script.Parent
	weld.Part1 = explosion
	weld.C1 = explosion.CFrame:inverse()
	weld.Parent = Handle
	Character:BreakJoints()
	sound.Ended()
	Tool:destroy()
	wait()
	
end)


this is giving me 23:59:11.647 - bad cast at line 22 , i dont get what i should write there.

2 comments

0

never mind just realized that explosion cant be welded, i just made the position equal to the handle...

0

Please add "[solved]" to the question title so people know not to look into the question