I have just learned OOP and type checking for like a month. I’m kind of new to it and having a problem…
Problem
So, i created a type checking module script (placed in replicated storage)
The issue is when i type --!strict, my main script (separate from the type checking script) appears this bug:
What i have tried
I have tried to ask ChatGPT for solution… But seems it doesn’t help my problem.
I thought i have figured out from a post i saw from dev forum but seems the problem still there…
Here is that post link: Guide to Type-Checking with OOP - Resources / Community Tutorials - Developer Forum | Roblox
Here is my type checking script:
local types = {}
export type animatronic = {
Connection: RBXScriptConnection?,
Char: Model?,
Name: string,
AiNumber: number,
DoorRoute: string,
--//Methods
New: (char, AiNumber, DoorRoute, TotalRoute) -> (),
Decide: (self) -> (number),
Static: (self, bool: boolean) -> (),
Jumpscare: (self) -> ()
} & any & typeof(setmetatable({}::self ,animatronic))
export type Foxy = {
self: typeof(setmetatable({}::self ,Foxy)),
foxyMinigameDuration: number,
foxyAttack: boolean,
SystemCountRequire: number,
PlayerCount: IntValue?,
--//Methods//--
New: (char, AiNumber, DoorRoute, TotalRoute) -> (),
_RandomPlushie: (self, number) -> (),
Attack: (self) -> (),
Move: (self) -> (),
CreateMove: (self) -> ()
} & animatronic
return types
Thank you for reading, I’m really bad at this .
Appreciate any comment! (sorry for my English skill) tell me if you need more information.
If you have any docs or posts that may help, it would be absolute awesome!!