how do you delete and apply a collider thru script javascript
You can use Destroy to remove the old collider and AddComponent to add the new one:-
Destroy(doomedCollider);
AddComponent(BoxCollider);
// Set collider properties...
thanks