The script looks basicly:
The special model finding way to one of points
P.S. I am reseted PC three times in-a-row
I made it say “Hello” before it computes path and saying Path.Status.Name
In total:
Script stops after message “Hello”
If you try to stop game (Shift+F5)
P.S.S. The studio in crash moment starting using all my RAM, i am got 16 GB of RAM
Then it’s just freezes and not continuing rendering and studio starting ignoring your any input.
In 10-15 seconds the PC became alot of slower
I thought problem was in while true do
and i am deleted it out of script, it won’t helped me
Maybe the problem is PathfindingService or smth?
I cannot get script’s source cus afraid lose this draft.
System contains:
GPU - RTX 3060 Ti
CPU - 6 Core Ryzen 4000 Series
Can someone help me? I hope to ASAP…
Edited: There is script source, how i am fetched, it won’t crash before i launched it…
--while true do
local service = game.PathfindingService
local folder = script.Parent.Parent.FireEmitterPoints
local point = folder:GetChildren()[math.random(1,#folder:GetChildren())]
local path = service:CreatePath({
AgentHeight = 2,
AgentWidth = 2,
AgentCanJump = false,
AgentCanClimb = false,
WaypointSpacing = 0,
Costs = {
Pavement = math.huge,
Marble = math.huge
}
})
print('Hello!')
path:ComputeAsync(script.Parent.Body.Position, point.Position)
print(path.Status.Name)
for i, v in path:GetWaypoints() do
local f = Instance.new('Folder', workspace)
f.Name = "FireEmitterWaypoints"
local p = Instance.new('Part', f)
p.Name = "FireEmitterWaypoint No. "..i
p.Anchored = true
p.CanCollide = false
p.Material = Enum.Material.Neon
p.Size = Vector3.new(.25,.25,.25)
p.Color = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
p.Position = v.Position
end
for _, v in path:GetWaypoints() do
script.Parent:PivotTo(CFrame.new(v.Position))
end
workspace.FireEmitterWaypoints:ClearAllChildren()
--end
P.S.S.S. Deleting of Path:ComputeAsync() helped and stopped the PC freeze, but still i don’t know the problem issue