#The Follower Wont die when the player does?
1 messages · Page 1 of 1 (latest)
heres the FollowerController script
movement
thats the little guy that follows me
and heres the
animate script
which adds the animations to the little guy
so he doesnt just float
if someone could help me that would be great
i used tutorials for these since im not great with coding
isn't it Humanoid:Died()
so from that you can connect a function
im on phone
and with that function just delete the npc
what function would delete the npc
stop all connection by disconnecting / setting to nil
idk
^^ this is the npc
didnt rea the code
:Destroy()
you should know it yourself how to remove the 'pc
its in serverstorage so when a player spawns in, then it spawns in
cause it's your code
so its a copy?
yeah im newer, most of this is youtube tutorials
thats why i need help T^T
sorry
what abt it
you play it
not much anymore
same
but its a good game
so create a function with :Died()
and when its fired
:Destroy the model of the follower
not if
function
[Humanoid of Player Character].Died:Connect(function()
[Model of the Follower]:Destroy()
end)
@brazen tangle
ty <3
Humanoid.Died isnt a if statement
so much
its a function
if statements only happen once
functions happen when an event happens
where would i find the humanoid of the player character
under the player character
also do i need to do something else if the Follower is inside of ServerStorage
if the player spawns, so does the follower with it
and itll only follow the player it spawned with
so yes
but if that player dies, then the follower completely stops
but it doesnt go away
its just there
or should it work
ok
so how would i do that
so put a script under the follower
destroys itself
when
like
use string.split()
idk how to explain this easily
would images help
this script is under the playerfollower
which is inside of serverstorage
ok
so for the destroy
do
script.Parent until it reaches the follower's model
remove string.split
show me the script inside of the follower
animate is just so the follower has animations
put :Destroy() on the same line as script.Parent
yeah
set a variable to the Follower's Name inside the script
and we can use string.split() to split the username from 's Follower
and FindFirstChild() inside workspace to get the player character
and find its humanoid
sorry im a bit confused
and detect if that died
so do this first
how?