R6 startercharacter .died humanoid function not working

  1. What do you want to achieve? Keep it simple and clear!
    no issue
  2. What is the issue? Include screenshots / videos if possible!
    the humanoid.died function on r6 startercharacer ain’t working
    i looked for solutions but i didnt see
local char = script.Parent
local event = game:GetService("ReplicatedStorage").Died

char.Humanoid.Died:Connect(function()
	event:Fire()
end)
  1. Is the event a bindable event?
  2. Is the script in StarterCharacterScripts?
1 Like

Bindable, startercharacterscripts
(there is another script that when the event is fired it does something but it didnt do something)

so is it firing the event?
if not, put a print before event:Fire() for debugging

1 Like

oops accidently made u solution, meant to heart comment

I put a print but didnt work

print(char.Name)

is it printing ur username?

didnt print anything

local char = script.Parent
print(char.Name)
local event = game:GetService("ReplicatedStorage").Died

char.Humanoid.Died:Connect(function()
	event:Fire()
end)
1 Like

nope
Dont work
( if u were wondering its server sided and the other script is also server sided)
What causing?

I definitely found a solution (or not)

print("test")
local char = script.Parent
local event = game:GetService("ReplicatedStorage").Died

char.Humanoid.Died:Connect(function()
	event:Fire()
end)

You can not put server sided scripts in StarterCharacterScripts, only local scripts.

rlly? i didnt know that
then how does the health script work in ur character

It’s a server script parented to the Humanoid instance. You can check this in playtesting.

isnt it parented to the character model

I’m not sure. My point is that StarterCharacterScripts and StarterPlayerScripts only accept local scripts.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.