Issue Type: Other
Impact: Low
Frequency: Constantly
Date First Experienced:
Date Last Experienced: 2021-05-01 10:05:00 (-05:00)
Reproduction Steps:
If a player character is respawned immediately after spawning, the Animate script that is inserted into the character by default will error. This is the error:
After looking at the script, my guess as to why this happens is that that section on the script didn’t run until after that specific character had already been destroyed. A simple fix to this would be to add if humanoid:IsDescendantOf(game)
before line 470.
To reproduce: Insert this into a Script in a new place.
local players = game:GetService("Players")
local function onPlayerAdded(player)
wait()
player:LoadCharacter()
end
players.PlayerAdded:Connect(onPlayerAdded)
Then click on the error in Output to see the Animate script that the error comes from.
When the wait()
is not included, the error does not happen. This is probably because the character (and the Animate script) has not yet been created by the time Player:LoadCharacter()
is run.
Expected Behavior:
The Animate script should not cause any errors, and should check if the Humanoid is still a descendant of the game before calling Humanoid:LoadAnimation()
.
Actual Behavior:
I don’t have any information other than what is shown above.
Workaround:
Ignoring the error that shows in the Output every time in hit play.