I can’t for the life of me figure out how to get which remote event fired in which door.
This is all I’ve got so far in my module script
local Doors = {}
-- Variables
local obj = nil
Doors.Func = function()
for _,Door in pairs(game.workspace.House.Interactive.Door:GetChildren()) do
obj = nil --?? I need to find the parent of the event (The door model) so I can access my bool and my event
end
end
return Doors
There are multiple doors, I’m just showing one because all the others are the same
Basically all I need to figure out is what event fired in what door.
I have a whole other script that fires the event so that’s fine.
My main script that fires the event only fires the the event inside the door my mouse is over. I kept all the Events named the same so I didn’t have to rewrite the code a billion times. all I need is to find what event was fired in what door. If I changed all the names, only one of the doors would work.
But if you don’t have the doors named what good is knowing which door has had the event fired in it?
You could put a bool value into each door and have a serial number that’s different in each door to give an indication of which door has had the event fired, then you could check each door to see if it has that serial number, but would that really be different than naming each door and firing the event on the script.Parent instead of having it named Door in the script.
That’s close to my current solution. I’m using an objectvalue and setting it to my event. My scripts are just having a hard time getting hold on my module script
You are trying to gain access to something only the server can access, which will come back as an error as the client cannot see anything in server storage or server script service.