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

Part not moving to the position of the dead enemy's torso? Im using Vector3 to move it?

So, when the enemy's health reaches 0, it generates some numbers to decide what to spawn and which. I have 4 of these, which different numbers. The ammo will spawn, way to the side of the map, with nothing there, just fall and delete itself. Is there a different way to move it, because of im pretty sure it's not.

if num2 == 1 then
			local Pistol = game.Lighting.Ammo.PistolAmmo:Clone()
			Pistol.Parent = workspace
			Pistol.Position = Vector3.new(script.Parent.LowerTorso)
			end

1 answer

✓ Accepted answer
if num2 == 1 then
            local Pistol = game.Lighting.Ammo.PistolAmmo:Clone()
            Pistol.Parent = workspace
            Pistol.Position = Vector3.new(script.Parent.LowerTorso.Position.X, script.Parent.LowerTorso.Position.Y, script.Parent.LowerTorso.Position.Z)
            end

make sure its R15 if ur using lower torso, if not, use torso or humanoidrootpart

You can also use

if num2 == 1 then
            local Pistol = game.Lighting.Ammo.PistolAmmo:Clone()
            Pistol.Parent = workspace
            Pistol.Position = script.Parent.LowerTorso.Position
            end

2 comments

0

Thank you, the first one works great!!

0

No problem.

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