Hi
I ran into a problem, in my game each player is invisible and every part of the character including accessories is non collide able and they also have a sphere attached to their rootPart which is also (the sphere) non collide able but for some reason player1’s character can collide with player 2’s character.
can you show a gif/video of what happens? i dont really understand
Are you using CollisionGroups? It would be easier to help if you can provide the code which is causing problems.
code:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
repeat wait() until plr:HasAppearanceLoaded()
char.Head.face.Transparency = 1
for i, v in ipairs(char:GetChildren()) do
if v:IsA("MeshPart") then
v.Transparency = 1
v.CanCollide = false
elseif v:IsA("Accessory") then
v.Handle.Transparency = 1
v.Handle.CanCollide = false
end
end
local plrBall = game.ReplicatedStorage.Ball:Clone()
plrBall.Parent = char
plrBall.Position = char:FindFirstChild("HumanoidRootPart").Position
plrBall.WeldConstraint.Part0 = plrBall
plrBall.WeldConstraint.Part1 = char:FindFirstChild("HumanoidRootPart")
plrBall.BrickColor = BrickColor.Random()
local leaderstats = plr.leaderstats
local massStat = leaderstats and leaderstats:FindFirstChild("Mass")
if massStat then
massStat.Value = 4
char:FindFirstChild("Humanoid").WalkSpeed = 40
char:FindFirstChild("Humanoid").JumpHeight = 0
plrBall.Stats.statsText.Text = "<font color=\"#57ff9d\">".. plr.Name .."</font>" .. "\n" .. "<font color=\"#ffffff\">".. "Mass: " .."</font>" .. "<font color=\"#50d7ff\">".. massStat.Value .."</font>"
end
end)
end)
It runs whenever a player joins
something its not cancollided, select all the parts and click on cancollide
you can cancollide just the foots
But I want it to be non collide able or to make spheres pass through the character with some other method.
Just cancollide that
.
I think I read on another post that Players update every frame and will become CanCollide each time.
What do you use to keep the ball and player on the ground instead of passing through?
Try reading Detecting Collisions | Roblox Creator Documentation. It explains how to keep Players from hitting each other, while still staying on the ground.
I just realised by checking through every single part of the player’s character that lower and upper torso is still collide able and I can’t change it through explorer because it goes back to ticked.
And I do nothing to keep them from falling, because when putting “everything” to can collide = false and it still stayed because of the upper and lower torso I didn’t realise it’s gonna fall, I thought nothing is holding it and it’s still ok.
Also, I would like to keep the character collide able but make it so that 2 characters can’t collide together which I can’t figure out how to do. I tried collision groups but i didn’t do it right and got errors.
Thank you! At first I got wrong what you said but after reading it again, I read the article you attached and it is perfect now. Thanks again!
You’ll need to make use of collision groups to achieve this, learn more here.