Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Bad cast at welding an explosion ?

Asked by 7 years ago
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.

0
never mind just realized that explosion cant be welded, i just made the position equal to the handle... rock2000117 0 — 7y
0
Please add "[solved]" to the question title so people know not to look into the question chess123mate 5873 — 7y

Answer this question