Jump to content

HELP I am trying to make a character which has if then statments and my code isn't working


Recommended Posts

local function onbecamehuman(inst)
    if inst.components.sanity.current >= 60 then
        inst.components.locomotor.walkspeed = 7
        inst.components.locomotor.runspeed = 8
    else if inst.components.sanity.current <= 59 then
        inst.components.locomotor.walkspeed = 9
        inst.components.locomotor.runspeed = 10
    end
end

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...