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

How not to loss pets when player die?

Asked by 4 years ago
Edited 4 years ago

I create a pet that, when the player equip, it will be in the player's character. but it will loss when the player dies, how can I fix this problem ?

0
can you post your script or scripts please? zomspi 541 — 4y

1 answer

Log in to vote
0
Answered by
NSMascot 113
4 years ago

throughout this answer I will refer to the players pet as 'Pet'

1) when the player gets the pet, clone it to game.Lighting using a localscript, you can add this code to an existing localscript, maybe the localscript where the player gets the pet.

game.Players.LocalPlayer.Character.Pet:Clone().Parent = game.Lighting

add this script to startercharacterscripts its a localscript

game.Lighting.Pet:Clone().Parent = game.Players.LocalPlayer.Character

this script will clone the pet from lighting to the players character any questions about the answer just ask below

0
thank you, i will try it tieuvuong07 -8 — 4y
0
how can i get pet when players equip 2 pets or 3 pets... ? it only works with 1 pets. maybe i can use loop for tieuvuong07 -8 — 4y
0
maybe use a loop NSMascot 113 — 4y
Ad

Answer this question