Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Infinite yield possible on 'ReplicatedStorage.Packages.Knit:WaitForChild("Services")' #231

Closed
SharkTheScripter opened this issue Aug 17, 2023 · 1 comment

Comments

@SharkTheScripter
Copy link

image

Client:

local Knit = require(game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("Knit"))
Knit.Start():catch(warn):await()
local ReplicationService = Knit.GetService("ReplicationService") -- line 7

Server:

local Knit = require(game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("Knit"))
local ReplicationService = Knit.CreateService(
{
	Name = "ReplicationService",
		Client = {
		Data = Knit.CreateProperty(nil)
	}
})
@Sleitnick
Copy link
Owner

You need to call Knit.Start() on the server too. If you still get this warning, I would suspect that a service is taking a long time to initialize. The GetService call on the client will yield indefinitely (hence the warning) until the services are available.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants