The game freezes and stops after 5 minutes. Absolutely everything stops and later after a minute or two it kicks and says that the connection is lost. Most likely i somehow screwed up in the scripts but I absolutely do not know because of what, I dont know if this will help, but in the dev console in network parameter default is the first. This is the case for all players in game and in other games all fine.
Local scripts work fine, but events and server scripts do not.
Please help, I have been suffering for two weeks
I know about it, but yes this is probably the problem. I have a lot of cycles, loops and even a remote event that is sent almost every .3 seconds (and a few other players). I had a script on public servers that performed such a cycle:
--(example)
local ms=game:GetService('MessagingService')
local rs=game:GetService('ReplicatedStorage')
local serversFolder=rs.Servers
ms:SubscribeAsync('Servers',function(data)
data=data.Data
if data.id~=game.JobId then
local sVal=script.template:Clone()
sVal.Name='server'..#serversFolder:GetChildren()+1
sVal.Value=data.id..','..dat.gm..','.data.map
sVal.Parent=serversFolder
wait(5)
sVal:Destroy()
end
end)
while game.VIPServerId==''do
local data={
id=game.JobId
gm=rs.gm.Value,
map=workspace.Map.Value
}
pcall(function() -- because too much requests
ms:PublishAsync(data)
end)
wait(15)
end
I disabled this script and it was possible to play longer for 5 minutes . Also, players complain about high ping. It is very likely that this is due to the high load on the Internet.
the saddest thing is that if I disable the scripts, half the game will stop working because they are very closely related, of course I can fix it, but its very very long
Yes but by disabling the scripts temporarily, you will be able to see if the scripts are the main cause of the crashing. Iām not saying to keep them disabled forever.
yes, but they are anchored and moving through tween (2 objects). There are 3 physical objects that can react to shots but they regenerate after a new round (max 3 min)
for me it was due to the fact that the script tried to set parent to object when the object was destroyed, and tried to do this about 300k times per second. It may also be due to game.Debris or something similar
The script in the post marked as the solution, was the issue. It is deleting objects the instant they are added into an object. Instances are not good with this type of behavior, thats why you can get this intimidating warning:
Something unexpectedly tried to set the parent of [?] to NULL while trying to set the parent of [?]. Current parent is [?]
So if you have a script that immediatly destroys or reparents instances that were just moved, this might be the cause of your issue. May you further explain your issue?
I dont get that but I just realized that the server memory is very high when there is multiple people in the game with 20 people it is already at 5000 and then once it hits 6000 it is when it crashes I dont know why it is so high