How would I create a Collision Group on the Client?

I’m trying to create a client-sided collision group, however I’m getting the error message “This API can only be used on the server!”. It’s making me want to punch a hole in my monitor

My code: PhysicsService:CreateCollisionGroup("group")

1 Like

That means that you literally cannot use Collision Groups on the client. You have to do it on the server.

1 Like
1 Like

The link you sent doesn’t mention CreateCollisionGroup being usable on the client

1 Like

Then what was the point of that being enabled?

1 Like

That post was made January 2019. That was over 2 years ago. I just saw this on the PhysicsService page:

1 Like

Not a good idea since exploiters can manipulate that lol. Roblox wants to prevent exploits not to encourage them.

3 Likes

We don’t plan to allow this method, or any collision group definition changes, from the client currently. We only allow parts to be assigned to groups and group definitions to be read on clients.

The names and configuration are all part of a single property internally. If you made changes on the client and then on the server the client changes would be overridden. Especially since it’s a finite set of 32 groups, currently referenced by index, any conflicts would be impossible to reconcile.

4 Likes

It’s been 3 years, where is this needed functionality? Your reasoning also sounds like an excuse mate. In order to handle complex situations you must remove limitations like these.

2 Likes

This is a reply late on in the conversation. But, in case anyone else finds themselves here as I did.

There isn’t a valid reason to specifically require creating collision groups on the client.
Being able to set a client side created instance to a collision group is sufficient.

I assume anyone who thinks they need to create/modify collision groups on the client is thinking this way because they are creating instances like NPCs or projectiles etc… that only exist on the client side. You can simply create the collision groups required on the server and set the appropriate group for them to use when you create them on the client side.

1 Like

There is no current solution to this problem. However you can set the part’s collision group on the server, and the client will abide by the group.

1 Like

There is no reason to have creating collisions on the client be impossible, regardless if you assume that it’s not the best way of doing things in every scenario.

1 Like

You can set the collision group on the client as well. You just can’t create the group on the client.

1 Like

The reason not to create them on the client is because you don’t want clients creating collision groups especially in a hack/exploit situation. A client could say create a collision group that lets them ghost through any barrier.

If you wanted that behavior, then you can create the “ghost” group on the server. And assign it on the client at any time. I’m just not seeing a situation where creating the collision group on the client makes sense.

1 Like

A client can disable collisions on the barrier and destroy them, your point does not stand.

1 Like

Fair enough. They could disable it on individual barriers for themselves. What’s the use case of creating the collision group on the client? J/c.