Hello, when i print the instance from the module script, Studio warns in the output that "ViewportDisplaySize is not a valid member of GuiService. (x4)" , How do you prevent and remove this?
ModuleScript:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local module = {}
function module:CreateStorage(name: string)
local storage = Instance.new("Folder")
storage.Name = tostring(name)
storage.Parent = ReplicatedStorage
return storage
end
function module:FindStorage(name: string)
if ReplicatedStorage:FindFirstChild(name) then
local storage = ReplicatedStorage[name]
print("found storage")
return storage
else
print("didnt find storage")
end
end
return module
Script:
local service = require(script.Parent)
local storage = service:CreateStorage("test")
local result = service:FindStorage("test")
print(storage)
print(result)
I think it’s a issue with returning the instance cause if i don’t return it, it will not warn?