add nil check for sprint

main
tenplus1 2020-08-29 17:26:21 +01:00
parent e82125db98
commit f13a9456d9
1 changed files with 3 additions and 1 deletions

View File

@ -168,7 +168,9 @@ local function set_sprinting(name, sprinting)
stamina.players[name].sprint = true
end
elseif sprinting == false and stamina.players[name].sprint then
elseif sprinting == false
and stamina.players[name]
and stamina.players[name].sprint then
if monoids then