Clear animation data when appearance is updated

This commit is contained in:
m 2023-01-31 08:54:12 -05:00
parent 2c1d9e1330
commit 4e5ae2a6ab
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@ function player_api.set_model(player, model_name)
local model = models[model_name]
if model then
if (model.animations) then
player_data.animation = nil
player_data.animation_speed = nil
}
player:set_properties({
mesh = model_name,
textures = player_data.textures or model.textures,