Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would you make a part come out of the torso, when killed?

local character = workspace.Enemies.Gem

character:WaitForChild("Humanoid").Died:connect(function() --waitforchild to make sure its there
    redgem = Instance.new("Part",game.Workspace.GemDropStorage)
    redgem.Size = Vector3.new(1,1,1)
    redgem.Material = "Neon"
    redgem.BrickColor = BrickColor.new("Really red")
	redgem.Position = game.Workspace.Enemies.Gem.Torso
end)

I want the part to come out of its torso when killed, not at a certain cordinates? How would i do this. It would also be helpful in the future

1 answer

✓ Accepted answer
local character=workspace.Enemies.Gem

character:WaitForChild("Humanoid").Died:connect(function()
   	local redgem=Instance.new("Part",workspace.GemDropStorage)
    redgem.Size=Vector3.new(1,1,1)
    redgem.Material=Enum.Material.Neon
    redgem.BrickColor=BrickColor.new("Really red")
    redgem.CFrame=game.Workspace.Enemies.Gem.Torso.CFrame
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.