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

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

Asked by 1 year ago

That is basically it

1 answer

Log in to vote
0
Answered by 1 year ago

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.

0
dont worrie i didnt need the player guardian_stone 12 — 1y
0
AND can i have more precision to where do i place the script guardian_stone 12 — 1y
Ad

Answer this question