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()
clone.Parent = game.Workspace
script.Parent = clone
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.
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.