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

How to do when an enemy dies it teleport you to another game?

That is basically it

1 answer

✓ Accepted answer

If the enemy has a humanoid, there's an event on the humanoid called "Died".

You could do something like:

local teleportService = game:GetService("TeleportService")
local enemyHumanoid = -- put the location of your enemy's humanoid here

enemyHumanoid.Died:Connect(function)
    -- teleport player using teleportService here
end)

I will not provide code to figure out which player has killed the enemy, as your question does not ask for that. You must figure that part out on your own.

2 comments

0

dont worrie i didnt need the player

0

AND can i have more precision to where do i place the script

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