Hello developers, I tried to make a wait function that yields until a value is true and it doesn’t work.
Module Code:
local serverStarted = false
function KoolServer:Start()
serverStarted = true
end
function KoolClient:WaitForServer()
--prints false
repeat RunService.Heartbeat:Wait() print(serverStarted) until serverStarted == true
end
Code:
Client:
Kool:WaitForServer()
print(134567) --does not print
Server:
Kool:Start()
Any help is appreciated, thanks.