So currently I have a respawn script, however it Humanoid.Died doesn’t fire. However if I put the script inside a dummy it works but when I put it inside a tree model with a humanoid it doesn’t work. No errors.
local RespawnTime = 2
while true do
char = script.Parent
clone = char:Clone()
char.Humanoid.Died:wait()
print("1")
wait(RespawnTime)
clone.Parent = game.Workspace
script.Parent = clone
char:Destroy()
end
You are not using your logic to modify the script. The script code inside it wouldn’t change itself, if you parent it to something else, you must change some of the script lines to make sure it’s referring the character model.
I’m sorry but I don’t really understand what you are trying to say. I have a rough idea, but how would that have anything to do with Humanoid.Died not firing?
First of all, you did not specify the char variable, you must create a new variable by using local. Second of all, script.Parent would get affected. If you parent this to a character model, it works fine because the variable contains the character model. However if you position it at somewhere else, for example SeverScriptService, the variable will contain ServerScriptService, which makes your script failed to work. Please use your logics.