How to change CollisionFidelity and RenderFidelity with scripts?

I made a explosion script that uses the CSG API.
However, you cannot go into the hole that it makes.
How do i change the CollisionFidelity and RenderFidelity with scripts??

I’m not too experienced with the CSG API but is this what you’re looking for?

Especially this snippet where you can set the collisionFidelity:

PartInstance:UnionAsync(partsToUnion, [optional] collisionFidelity = "Default")
PartInstance:SubtractAsync(partsToSubtract, [optional] collisionFidelity = "Default")

Thanks, I’ll try it tommorow!
Also, your probably more experienced then me. I learned about his 4 hours ago.

Alright, it makes a few errors.
Should I define collisionFidelity like

local collisionFidelity = enum.CollisionFidelity
PartInstnace:SubtractAsync(partsToSubtract,collisionfidelity = "Default")

I believe it should work, as I said I’m not too experienced with the CSG API. Could you send a screenshot of the errors you’re getting?

This developer article may help you a bit more. It provides examples for both :UnionAsync() and :SubtractAsync().

Furthermore, here are some screenshots of the API reference for both :UnionAsync() and :SubtractAsync().


PartInstance:UnionAsync({PartsToUnion}, Enum.CollisionFidelity.Default, Enum.RenderFidelity.Default)
PartInstance:SubtractAsync({PartsToSubtract}, Enum.CollisionFidelity.Default, Enum.RenderFidelity.Default)
1 Like