local function playerAdded(player)
if player.Character then
if player:HasAppearanceLoaded() then
for _, part in next, player.Character:GetDescendants() do
Core.PhysicsService:SetPartCollisionGroup(part, “Players”)
part:SetNetworkOwner(player)
end
end
end
player.CharacterAppearanceLoaded:Connect(function(character)
for _, part in next, character:GetDescendants() do
if part:IsA("BasePart") then
Core.PhysicsService:SetPartCollisionGroup(part, "Players")
end
end
end)
end
function Core:Initialize()
game:GetService(“Players”).PlayerAdded:Connect(function(player)
playerAdded(player)
end)
for _, player in next, game:GetService(“Players”):GetPlayers() do playerAdded(player) end
for i = 1, 1 do
end
end
return Core
i am absolutely terrible at scripting. And i got this error : SetPartCollisionGroup is deprecated, please use BasePart.CollisionGroup instead.
local Core = {}
local Meshai = require(game:GetService("ServerScriptService"):WaitForChild("Server"):WaitForChild("Core"):WaitForChild("Meshai"))
Core.PhysicsService = game:GetService("PhysicsService")
Core.PhysicsService:CreateCollisionGroup("Players")
Core.PhysicsService:CreateCollisionGroup("Meshais")
Core.PhysicsService:CollisionGroupSetCollidable("Players", "Players", false)
Core.PhysicsService:CollisionGroupSetCollidable("Meshais", "Players", false)
Core.PhysicsService:CollisionGroupSetCollidable("Meshais", "Meshais", false)
local function playerAdded(player)
if player.Character then
if player:HasAppearanceLoaded() then
for _, part in next, player.Character:GetDescendants() do
if part:IsA("BasePart") then
part.CollisionGroup = "Players" -- you assign part collision group to Players
part:SetNetworkOwner(player)
end
end
end
end
player.CharacterAppearanceLoaded:Connect(function(character)
for _, part in next, character:GetDescendants() do
if part:IsA("BasePart") then
part.CollisionGroup = "Players" --Same here
end
end
end)
end
function Core:Initialize()
game:GetService("Players").PlayerAdded:Connect(function(player)
playerAdded(player)
end)
for _, player in next, game:GetService("Players"):GetPlayers() do
playerAdded(player)
end
for i = 1, 1 do
end
end
return Core