I really can’t think of a better name for this. When using Test>Server>1 Player, if you are focused on the Client Window, after a certain amount of Time, the Server Falls asleep or stops looking for Remote Events/Functions calls from the Clients.
Repro Video:
Repro Place: Sleeping Server - Roblox
--Server:
game.ReplicatedStorage.RE.OnServerEvent:connect(function(player,org,dest)
local B = game.ReplicatedStorage.Bullet:Clone()
B.CFrame = org
B.BV.velocity = (dest-B.Position).unit*80
B.Parent = workspace
wait(2)
local con
con = B.Touched:connect(function(hit)
con:disconnect()
con = nil
B:Destroy()
end)
wait(10)
pcall(function()
B:Destroy()
con:disconnect()
con = nil
end)
end)
--Client
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:connect(function()
game.ReplicatedStorage.RE:FireServer(game.Players.LocalPlayer.Character.Head.CFrame,mouse.Hit.p)
end)
Repro Steps:
- Open the Place in Studio and Test>Server>1 Player
- From the Client Window, just click around on the Screen to shoot White Parts from your Head.
- keep doing Step 2 for about 1 to 2 minutes
- at some point the Parts will stop being created from your characters Head
- When Step 4 happens, keep clicking around your character (about 10-20 times)
- Click anywhere outside the Client (so that the Studio Client Window is not focused)
- Noticed that the server finally gets the message and fires all of the Parts at once (as seen in the video)
- Click on the Studio Server Window
- Return to the Studio Client Window
- do Step 2 and noticed the Parts fire again correctly, until Step 4 happens again.
Basically clicking on the Studio Server Window, makes the Server wake up, and then after 1-2 minutes of the Server Window not being the focus the Server goes back to sleep.
I think this started happening after the recent Update (that occurred Last night?), or it started happening after I upgraded my OS for Mac from Maverick to Yosemite.
I’m on a MacBook Pro (Retina, 15-inch, Early 2013), running on OS X Yosemite
This gets very annoying when trying to test stuff, since at some point the Server just stops processing requests from the Client and I think that my Code is to Blame, when it’s not ![]()