👤Conditions
Dont nest
local function logoutPlayer()
if playerData.loggedIn then
if playerData.player.exists() then
playerData.player.logout()
end
end
endlocal function logoutPlayer()
if not playerData.loggedIn then return end
if not playerData.player.exists() then return end
playerData.player.logout()
endUse inline if statements when possible
local function getPlayerName()
if playerData.playerLoaded then
return playerData.name
else
return 'unkown'
end
endlocal function getPlayerName()
return playerData.playerLoaded and playerData.name or 'unkown'
endLast updated
