#Collisions groups
1 messages · Page 1 of 1 (latest)
The idea is that I want the two players to have collisions with some objects that are only made on their client's side, but other players can collide with those objects even if for them, they don't exist...
I thought of using run service to make the other player's characters (torso and head) uncollideable but I don't think this would be very slow devices friendly
I don't need a full script detailed, I just need an idea on how to make this work, like I said, I tried some things but none of them really worked...
ping me if you got an idea
just make 2 copies of the part in both clients, and set its properties as you want
This is what I did
The issue is that , when one of the player grabs the block, it works fine, but if there is another duo of players that are at the same place as the cube is for you, they will collide with it, altho for them they collide with nothing so they continue moving and it makes it hard to move the block when there are other players that are not in your duo
the systeme I made is that each client creates the block on their side, and if a player grabs the block and is in a duo, then it replicates the movements to the seconds player in the duo, which works well, I just need to make it so on the client side that has the block, the other players cannot interfer with the block's position
Can you send a vid example?
sure
@buoyant heron let me record it, it will be a bit laggy perhaps as I need to simulate three players to show you my issue
the video file is too large 💀
how can I send it to you @buoyant heron ?
use streamable
wait I'm compressing the video
here you go
so the issue in this video is that the "player1" should not be able to collide with the "player3" and the "player2" block.
@spare reef what you think ?
Maybe
Turn off collision on all other players
Or make a collision group on the block that won’t collide with other players than the duo
Duo collision group(+block): "Duo"
OtherPlayers: "OtherPlayers"
Duo can’t collide with other players
yea that is what I thought, but the issue is that the block dosen't exist on the server side, so there is no way to do that
Another idea:
make a folder (I’ll call it main for now)
When a duo is created, make a folder inside main named Plr1Name+Plr2Name.
Make the block inside the folder
A localscript will make that folder removed if you’re not a part of the duo
That way, the block exists on server but only that duo will have the block
Then, make a new collision group for the block and for the players (same one) and make it so the other duos group won’t collide with it
How to:
https://devforum.roblox.com/t/collision-groups-with-scripts/2152867/2
First you have to create a collision group: PhysicsService:RegisterCollisionGroup("NameOfCollisionGroup") Then you have to set it: part.CollisionGroup = "NameOfCollisionGroup" Your script would look something like this: local CollisionName = "Karts" PhysicsService:RegisterCollisionGroup(CollisionName) part.CollisionGroup = "NameOfCollisionG...
Have a table with all duos collision groups so you can disable em from the new one
Also when a new one is created update all others
Hey, thank you for your idea, I'm sorry I closed this channel as I found a solution, if you are interested, I simply used "nocollisionconstraints" that I added to all the players's head, torso and hrp that arent part of the duo
so that's a bit the same as using collisions groups, but it also works on client
I just didn't knew those nocollisionconstraint existed
thank you for your help