#(SHORT SCRIPT) How to activate an OOP method without remote events?

22 messages · Page 1 of 1 (latest)

icy fulcrum
#

(SHORT SCRIPT) How to activate an OOP method without remote events?

hybrid raft
#

You can't do that.

snow orbit
#

show everything, from here it looks like u dont know what ur doing

#

wdym door OOP has a method called action

#

where is it

#

show

icy fulcrum
#

@snow orbit its in a module script in replicated storage

#

meanwhile this script is in starter gui

#

im just testing things and well i want to know how i can trigger that method by doing something like this

icy fulcrum
#

i realized from the 4 errors

#

but that reassured me

#

btw ashton

snow orbit
#

well if its in a module script in replicated storage....

icy fulcrum
#

want me to show the full script?

snow orbit
#

ye

icy fulcrum
#

or no need

#
function Door:Action(SpawnRoom)

    if not self.Debounce then return end --Checks if debounce is false. If it is, the function/method is ended. Else, continues

    self.Debounce = false

    if self.State == "Opened" then

        self.State = "Closed"
        self.DoorClose:Play()

    elseif self.State == "Closed" then

        self.State = "Opened"
        self.DoorOpen:Play()

        if not self.HasSpawnedRoom then --Checks if the door spawned a room yet. If it did, the function/method is ended. Else, continues

            self.HasSpawnedRoom = true
            if SpawnRoom then SpawnRoom() end

        end
    end

    self.Debounce = true

end
snow orbit
#

but ur prob is that ur tryoing to call the method on the door object in workspace and not the door object u made in module

icy fulcrum
#

do you know how i can do the door object in the module

#

instead of workspace one

#

how can i access the method