MeshPart unable to be anti-collisional


I am trying to make a tycoon game, I am making a button that has a preview inside, so the user can see a glimpse of what they’re purchasing.

I have all the PartMesh’s set to anti collisional.

Though, I have pasted this from another game it works in, it does not, however, work in this game. I have named them the same, given them the same values, everything. Nothing else I can do.

Would anyone know as to why this is happening? Thanks

1 Like

You haven’t given enough detail. “Does not work” gives me no information to work with. What exactly is not working. Is the button not working or is your issue that the player is now colliding despite collisions being off?

The button works, but as you said, the player collides with the “preview” model that is set to collisions off.

Troubleshoot this by moving this model to an empty baseplate and testing its collision there… that way you can atleast rule out the model, versus something else in your game that might be interfering.

Also, from your picture hierarchy there, it looks like Alt and Head have not been selected… maybe these are what the player is colliding with?

Thank you for your reply,

I have added the same model into an empty baseplate and it is indeed something on my game interfering with it. It is anti-collisional as it should be on the empty baseplate.

The button head and alt wouldn’t be the issue, it’s the sword mesh that is collisional.

Have you tried something as simple as renaming it? In case a script is moving this item into a collision group? Also, I see that you have a snapshot of the meshparts collision properties… was this taken in game? If not, take a pic in game and see if its still those same properties.

1 Like

Yes, I’ve named them all the same. When I go in game, The whole box’s collisions are on. But I can’t walk through the box, only the weapon.

The box is part of the meshes you showed in this pic?

And its turning its collisions to on when the game starts? Is this box identical to the other boxes that are working properly? Im assuming a script is setting its collision back on, I would go through the script that is in this giver. However, it isnt doing it to the other givers, so maybe try recreating just the box from scratch, since this is the one giving you issues.

Yes, the box is part of the meshes I showed in the image.

It turns on collisions when the game starts, there is only one box like that in the tycoon, but, I have a “preview” turret that shows the model too, that has different names. Whether I redo the box or not, it’ll always give me issues. And, when I remove the button and purchase object, It completely breaks the tycoon. It’s very strange.

1 Like

Sounds to me without seeing more detail of your game setup, that a script is controlling the purchase and preview buttons and models, but im just speculating. Also explains why removing something that the script references will break the game as the script relies on this item to keep functioning.

If this is a big component of your game and you need to resolve it, it wont hurt to post your script to the scripting section and relay your issue there. But leave this post open in case im wrong.

Also have you tried making it all collidable and maybe the script will just invert it when game starts?

What is the Mesh Alt and Head? These might be giving collisions and if they have weird collision geometry it could be the root of the issue.

Also if your game doesn’t use those meshes for any collision or raycasting or whatever, then I suggest disabling CanQuery, CanTouch and setting its CollisionFidelity to Box as well. With those properties disabled it saves on collision calculations which can reduce lag.

The Alt and Head is the button. And yeah, I’ll disable those, thanks for that.

I’m thinking that the tycoon would definitely require collision code in the placement of the final model. By default, everything is already in position, but invisible and non-collidable. When you press the ‘buy’ button, it would normally ‘place’ the item by setting the transparency and collisions to make the item appear. It seems that you are trying to add a transitional step that sets the model to partial transparency and the colour green before the purchase is finalised.
But the finalisation code that is supposed to make the item appear seems to be running and setting the collisions earlier than it should be.