Unable to assign property CollisionFidelity. Script write access is restricted

So I made a script that cuts things in half, but for some reason it won’t let me change the collision fidelity. I’m not sure what to do other than not have this, but I want it to change the collision fidelity.

EDIT: I just saw that you can’t script it, but there must be a way right?

Script:

local part = workspace.sliced
part.Anchored = true
local slice = game.ReplicatedStorage.Slice:Clone()
slice:PivotTo(part.CFrame)
slice.Parent = workspace
local double = part:Clone()
double.CFrame = part.CFrame
double.Parent = workspace
local leP = {part, slice.Left}
local left = part:SubtractAsync(leP)
local riP = {double, slice.Right}
local right = double:SubtractAsync(riP)
double:Destroy()
slice:Destroy()
left.Anchored = false
right.Anchored = false
left.Velocity = part.Velocity
right.Velocity = part.Velocity
left.CollisionFidelity = Enum.CollisionFidelity.PreciseConvexDecomposition -- this is the problem
right.CollisionFidelity = Enum.CollisionFidelity.PreciseConvexDecomposition -- and this
left.Parent = workspace
right.Parent = workspace
part:Destroy()
script:Destroy()

“Script Write Access is Restricted” means that the property you are trying to edit cannot be edited by a script/the script does not have clearance to edit the property. Theres no way (as far as I’m aware) to bypass this.

I just found out how to edit the collision fidelity during the union function, solved.

Sorry to bump, but did you do this in a script? If so, may I see it?

may i ask, how did you do this?

How could you do this in the script, nothing works for me…

He asked himself and found the answer himself. And the answer is here: