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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...