Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[Solved] How to stop a player's physics from colliding on a part?

Is there a way to disallow certain objects to affect physics on another part, but allow the certain object to collide with the other part? Because I made a dash script with BodyVelocity and I don't want my character to bounce and fly around when they collide into a part, but I want it to be consistent when they collide.

Solved: Enable TemporaryLegacyPhysicsSolverOverride in Workspace

5 comments

0

cancollide?

1

To go along with Color3FromRGB's link, here is an introduction to Collision Groups. This is the feature you should use! https://developer.roblox.com/articles/Collision-Filtering

0

Yeah but I need it for every part/object in the whole game

0

Nvm I solved it by myself all I had to do was enable TemporaryLegacyPhysicsSolverOverride in Workspace :/

2 answers

THREE SOLUTIONS without even needed to mess with the physics

If you don't want anything to collide with your player then simply select the parts and in the properties change cancolide to false or

you can use this script

Parts = game.Workspace:GetChildren("You can put names in here like ModelName1 or Part5")

Parts.CanColide = false

--Part 2--
CharParts = game.Players.LocalPlayer.Character:GetChildren()
CharParts.CanColide = false

I may have misspelled something but so far the script looks good to go! This should be simple but if you dont want the player to mess with the objects and other players to mess with the parts/object then try, in a local script, Type everything under part2. these could work but if it goes more in depth like you want a specific thing then just tell me what.

[BEST SOLUTION TO YOUR PROBLEM] if your trying not bounce you could just make gravity stronger when you hit the ground so its not a giant bounce.

2 comments

0

I actually wanted the character to still collide with the objects and everything but not fling back when they have a greater impact between the player and the parts

0

Then the best solution in my opinion is when they are falling and they make contact they teleport to when the bottom was touched or the gravity to be lowered. I highly doubt editing roblox physics is needed and I'd rather stay away from Most Core things in Roblox (Except Guis) unless commonly told otherwise.

complete edit:

ok judging by ur situation theres one thing one can do; slow down when one is about to hit a wall. Let me illustrate;

local distance = 5

local root = script.Parent:FindFirstChild("HumanoidRootPart") or script.Parent:WaitForChild("HumanoidRootPart")

for i, part in pairs(workspace:GetChildren()) do
	if (root.Position - part.Position).magnitude < distance then
		reducevelocity() -- or whatever is ur function
	end
end

5 comments

0

And you expected to get reputation from this? You know there's a comment section right?

0

dude. if reputation is not money then y i need it im just helping a man here

0

plus im just using this as a placholder to get back to when im more free

0

Didn't really help me but thanks for trying anyways

0

ok

This discussion is preserved as it was. New answers, comments, and votes are closed.