local RoundService = Knit.CreateService({
Name = "RoundService",
Client = {
gameStarted = Knit.CreateSignal(),
intermissionStarted = Knit.CreateSignal(),
vote = Knit.CreateSignal(),
voteChanged = Knit.CreateSignal(),
},
roundTime = 360, -- 6 minutes
intermissionTime = 20, -- 30 seconds
gameStatus = false, -- false: intermission, true: game
raidTeam = game:GetService("Teams").Red,
defendTeam = game:GetService("Teams").Blue,
lobbyTeam = game:GetService("Teams").Lobby,
voteResult = {},
})
function RoundService:Intermssion()
print(RoundService.Name) -- "RoundService"
print(self.Name) -- Attempt to index nil with Client
...
end
Why is self
undefined? (Using Knit)