#How to reference a self table in another module script

1 messages · Page 1 of 1 (latest)

icy shuttle
#

So I have this condition in an input manager of mine:

local orbStates = require(classes.orbStateManagerClass) --Want to reference something inside here that's inside a self table, but how??

Service.uis.InputBegan:Connect(function(input, processed)
        
        if processed 
            or input.UserInputType ~= Enum.UserInputType.Keyboard 
            or not allAllowedInputs[input.KeyCode]
            or self.states.modflag
            or self.states.requiredElement ~= --[[How to get current self state from orb state Manager??]] then
            return
        end

and then in the orb state manager there's some CAS bind actions and stuff:

local Switch_Elements = function(actionName, inputState)
        if actionName == "Switch to Air" and inputState == Enum.UserInputState.Begin then
            if self.States.current_ElementalState[1] == self.States.Air then return end
            
            self.States.current_ElementalState[1] = self.States.Air
            print(self.States.current_ElementalState[1])
            local currentElState = self.States.current_ElementalState[1] --Basically how do I get this variable from this per user self table to the other module.
left wadi
#

are u using the module script in the same type of scripts, client/server

icy shuttle
#

as of right now I've only wrote down code for client side

wind prairieBOT
#

studio** You are now Level 2! **studio