#Queue Service

1 messages · Page 1 of 1 (latest)

winter widget
#

i am kinda having trouble here and i wanna know if this is a good beginning

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")
local Networker = require(ReplicatedStorage.Packages.Networker)
local lobby = Workspace:WaitForChild("Lobby")
local QueueServiceClient = {}

function QueueServiceClient.init(self: QueueServiceClient)
    self.networker = Networker.client.new("QueueService", self)
    self.queuePart = lobby:WaitForChild("QueuePart")
end

function QueueServiceClient.queuePlayer(self: QueueServiceClient)
    for _, model in pairs(self.queuePart:GetChildren()) do
        for _, part: BasePart in pairs(model:GetChildren()) do
            if part.Name == "HitboxGrey" then
                part.Touched:Connect(function()
                    self.networker:fire("attemptQueuePlayer")
                end)
            end
        end
    end
end

type QueueServiceClient = typeof(QueueServiceClient) & {
    networker: Networker.Client,
    queuePart: BasePart,
}

return QueueServiceClient

south spear
#

why are you not not using : instead of the . this way you dont have to assign the self variable

#

what exactly are you trying to achieve?

#

queues are normally handled by the server and not client

winter widget
south spear
#

oh yea