Hello devforum,
Today my issue regards reading a pre-inserted UserID from a ModuleScript and comparing it with the LocalPlayer’s ID to change how the script acts.
This is to be used as part of a tower I’m currently developing for the up-and-coming game Speedwell, the intent is for the script to use a different path when a Content Creator is playing the tower as a small easter egg which I think would be really funny.
Currently, the IDs are stored in a ModuleScript (as mentioned), here is the layout for said script:
local YTModule = {}
YTModule.IDs = {
0,
0, -- Just image these being UserIDs
0
}
return YTModule
and here is my method for reading it in the LocalScript which needs to read it:
local YTIDs = YTModule.IDS
local YT = nil
function YTInfoGet()
for i, v in YTIDs do
if i == plr.UserId then
local YT = true
else
YT = false
end
end
end
Unfortunately, I’m not really a person who uses for statements that much, and I don’t know how to navigate them that well.
Apparently, doing it this way, doesn’t work.
If anyone can help, please reply below.