Script: ServerScriptService._0xS0URC3X.Server.BackgroundLoop Message: ServerScriptService._0xS0URC3X.Server.BackgroundLoop:63: Function RemoteEvent.FireClient is not safe to call in parallel Trace: ServerScriptService._0xS0URC3X.Server.BackgroundLoop, line 63
This has never happened to me before, I do not have Lua parallel mode turned on, and this is causing major issues with my game launch. Is there an easy way to prevent this from happening?
Its multiple things in multiple places. I’ve never had this issue before though, the code that is erroring didn’t break before. They code is being ran in threads but usually in Lua they aren’t real threads that run in parallel
I’m getting this error too and it’s messing up the AI in my game and usually occurs when I use PathfindingService.
I’ve been trying to debug and find out what’s going on specifically: I thought using Bindables was the problem so I removed Invoke (because I use invoke to get pathfinding) and just converted it to a local function and was thinking these parallel errors are only caused by task but now I’m getting errors on this:
while Building and Armor and Humanoid and Humanoid.Health > 0 do --Line 45
local CanContinueScan = true
local PreviousBuildTags = ExcludedBuildTags
local TeamTag = FindFirstInstance(Building, "Vector3Value")
for p = 10, 0, -1 do
if CanContinueScan == true then
local ScanReach = 525
if TeamTag and game.Workspace:FindFirstChild(TeamTag.Name.."BuildPlate") then
ScanReach = (game.Workspace:FindFirstChild(TeamTag.Name.."BuildPlate").Size.Z-175)
end
local CurrentScanLength = (ScanReach/10)*p
if p <= 0 then
CurrentScanLength = -12.5
end
local CurrentScanPos = PlatformStand.CFrame.p+PlatformStand.CFrame.lookVector*CurrentScanLength
local BackScanPos = PlatformStand.CFrame.p+PlatformStand.CFrame.lookVector*(CurrentScanLength+1)
local PossibleTargetPos = PlatformStand.CFrame.p+PlatformStand.CFrame.lookVector*(ScanReach+25)
local PathfindSetting = {AgentRadius = 15, AgentHeight = 45, AgentCanJump = true}
local GeneratedPath = PathfindingService:CreatePath(PathfindSetting) --Erorr occurs here
GeneratedPath:ComputeAsync(PossibleTargetPos, CurrentScanPos)
--local HighlightPart = Instance.new("Part", game.Workspace.Debris)
--HighlightPart.Anchored = true
--HighlightPart.CanCollide = false
--HighlightPart.Size = Vector3.new(1, 5000, 1)
--HighlightPart.CFrame = CFrame.new(CurrentScanPos)
--DebrisService:AddItem(HighlightPart, (ScanTime))
if GeneratedPath.Status == Enum.PathStatus.Success then
--HighlightPart.BrickColor = BrickColor.new("Bright blue")
ScanAllyBuildings(CurrentScanPos, BackScanPos)
else
--HighlightPart.BrickColor = BrickColor.new("Bright yellow")
CanContinueScan = false
break
end
end
end
for i = 1, #PreviousBuildTags do
if PreviousBuildTags[i] then PreviousBuildTags[i]:Destroy() end
end
PreviousBuildTags = {}
wait(ScanTime)
end
Very confused on why I’m getting an error here. This doesn’t use any task stuff or use any bindables.
I’m also very clueless on how pararrel is even being called when I have the beta set to off and I also don’t have any idea how it works
That’s not a problem for me I use task.spawn and task.defer that I unfortunately can’t remove from my handle AI. Also the example I used doesn’t use any task library stuff so I’m generally confused on what’s going on.
I’m having the same issue. Ever since the last update (about a day ago) I’ve received thousands of these write in parallel errors on code that hasn’t been touched in months. The place where it is erroring is shown below:
ui.Parent = script --this is the line that has been continuously erroring
sf:ClearAllChildren()
ui.Parent = sf
The exact error message is as follows: Property Instance.Parent is not safe to write in parallel
Now this is code for my global leaderboard system that I have in game so it’s not game breaking. However, I’ve had numerous reports about leaderboards not updating so I can assume this is the issue.
I just want to state again, I have not touched this code in months and it has had no issues until the latest update. I’m assuming this latest update brought in this bug.
If anyone else has had this issue please let me know and I’ll make a bug report.