Yes, that is the case. It is needed for my game.
Can you listen to me? I already told you the reasons of why your game has high average ping.
local Players = game:GetService("Players")
local PhysicsService = game:GetService("PhysicsService")
local playerCollisionGroupName = "Players"
PhysicsService:CreateCollisionGroup(playerCollisionGroupName)
PhysicsService:CollisionGroupSetCollidable(playerCollisionGroupName, playerCollisionGroupName, false)
local function setCollisionGroup(object)
if object:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(object, playerCollisionGroupName)
end
for _, child in ipairs(object:GetChildren()) do
setCollisionGroup(child)
end
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
setCollisionGroup(character)
end)
end)
This should be enough already. I picked this script from my old game and works normally
Your telling me something I already know. I need to know an alternative to make this not laggy.
Okay, if my help is useless I might as well not waste my time in here.
Okay, I will try it out and keep you updated. If there is no lag after a while I will mark the answer as correct.
Although, my developer was lagging even opening studio. Could it be a problem with meshes my dev recently added? They are nothing big, but I guess I will just see how things go.
Should always double check, I have had a game with a virus before and it killed the performance and when I used a virus plugin it fixed EVERYTHING! If you would like I have a suggestion, TG Guardian made by TGazza, very useful and it scans everything! 10/10 plugin.
Hey, this didnāt seem to work. The players collide with each other, no error.
Iām sorry if I was rude. The problem with the script is, that it changes the collision every time a descendant of the character is created or destroyed. Thats just too many changes and since the script has like 30k+ rates I think the problem is really there
No, you were not rude. Your all good!
Are u sure? I just tested this script and I canāt collide with players
The script should be in server script service
Yeah I am sure. Script in server script service. Still having issues.
Are you testing it in studio? If you published the change and you are trying to test it in a live server, then make sure you shutdown servers, because the changes are going to be only in new servers
Update: It works with some things, but I think accessories still collide. I will fix this on my own.
I think accessories donāt collide on default and the script should pick up any thing that is a descendant of player, so accessories should work tooā¦
Its weird. Iām not sure why you have this problem. I created a new place and used the same script and it works without issues
Why do you reset the collision group for an object when itās removed from the character? At that point the object wonāt exist, so thereās no point changing the collision group on DescendantRemoving
Well I changed it to :GetDescendants() and it is still having slight issues. It worked in studio with my avatar, but maybe it is certain avatars that have this issue. I donāt know.