idk what is this message but it appeared when it runs this line of code:
function OnDied()
Walk:Stop()
Idle:Stop()
Slime.Head.Sad.Transparency = 0
Slime.Head.Happy.Transparency = 1
Slime.HumanoidRootPart:Destroy()
Slime.Animations:Destroy()
Slime.Head.Anchored = true
Slime.Head.Rumble.TimePosition = 3
Slime.Head.Rumble:Play()
local rotation = Slime.Head.Rotation
for i=1, math.random(100,150) do
Slime.Head.Rotation = rotation
Slime.Head.Rotation = rotation + Vector3.new(math.random(-10,10), math.random(-10,10), math.random(-10,10))
task.wait()
end
Slime.Head.Rumble:Stop()
Slime.Head.ExplodeSound:Play()
Slime.Head.Sad:Destroy()
Slime.Head.Stats:Destroy()
Slime.Head.Transparency = 1
Slime.Head.CanCollide = false
Slime.Head.ExplodeParticle.Color = ColorSequence.new(Slime.Head.Color)
Slime.Head.ExplodeParticle.Enabled = true
wait(0.5)
Slime.Head.ExplodeParticle.Enabled = false
wait(4)
Slime:Destroy()
SlimeModule.SpawnSlime(workspace.SlimeSpawn[Slime:GetAttribute("SpawnBiome")][Slime:GetAttribute("SpawnPart")], workspace.SlimeSpawn[Slime:GetAttribute("SpawnBiome")], Slime.Name)
end
oh and here’s the output for more information
i need to fix it or my game will do bad with performance
ps: the WatchForErrors is a module and inside is empty
2 Likes
Can you send a screenshot of where the first instance of this error occurs?
2 Likes
idk when it does the error it just pop
2 Likes
Ok, I don’t think there’s much you can do about it, as it seems to be a problem with an if statement in the module. The performance impact is minimal, so it doesn’t matter too much.
2 Likes
the console goes crazy only if i kill ONE BUT ONLY ONE SLIME
2 Likes
NOT 1000 NOT 100 BUT 1 (im gonna write this bc i need 30 of text)
2 Likes
JmPopYT
(DeveloperPop)
January 16, 2024, 7:54pm
#7
First of all, that module is RobloxLocked, it means that only Plugin Scripts can access it and Roblox also makes it empty to secure it.
Second of all, the module you’re running might have an loop inside of it that is playing alot of times and doesn’t have time to rest and that’s why the errors show up. (watchForErrors’s job is to get the errors from a module)
Try making the loop delayed a little bit.
2 Likes
what loop are you talking about?
2 Likes
JmPopYT
(DeveloperPop)
January 16, 2024, 7:56pm
#9
I mean that’s the only possible way that the script is showing a error that it’s exhausted.
There has to be a loop
1 Like
in what script? my script or the WatchForErrors
1 Like
JmPopYT
(DeveloperPop)
January 16, 2024, 7:59pm
#11
Your script,
and this one line,
SlimeModule.SpawnSlime(workspace.SlimeSpawn[Slime:GetAttribute("SpawnBiome")][Slime:GetAttribute("SpawnPart")], workspace.SlimeSpawn[Slime:GetAttribute("SpawnBiome")], Slime.Name)
Does the Module for it have any loop or something that repeats alot till the script its exhausted?
2 Likes
JmPopYT
(DeveloperPop)
January 16, 2024, 8:01pm
#12
and maybe check this post,
You can disable the timeout in Studio with the following command (or just set the setting manually):
settings().Studio.ScriptTimeoutLength = -1
Long-running scripts should basically never happen on live servers (blocking important server stuff) and clients (player experiences lag), so you should find a way to batch if that’s where you’re going.
A dumb but effective way to “batch” is to yield conditionally based on execution time. For example:
local Budget = 1/60 -- seconds
local expireTime …
1 Like
i think is a roblox bug because the module is only this:
function module.SpawnSlime(spawnPart, spawnPartParent, Type)
local Slime = Slimes:FindFirstChild(Type)
if Slime then
Slime = Slime:Clone()
Slime:SetAttribute("SpawnPart", spawnPart.Name)
Slime:SetAttribute("SpawnBiome", spawnPartParent.Name)
Slime.Parent = workspace.GeneratedSlimes
Slime:MoveTo(spawnPart.Position + Vector3.new(math.random(-10,10), 0, math.random(-10,10)))
Slime.Parent = workspace.GeneratedSlimes
if Type == "CommonSlime" then
Slime.Head.Color= Color3.new(math.random(0,255), math.random(0,255), math.random(0,255))
end
else
warn("The Slime Named:", Type, "DoesNotExist")
end
end
1 Like
JmPopYT
(DeveloperPop)
January 16, 2024, 8:09pm
#14
Might be a Roblox bug but why did you parent the Slime 2 times to the same location lol
2 Likes
system
(system)
Closed
January 30, 2024, 8:11pm
#16
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.