Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by
fr2013 88
5 years ago
Edited 5 years ago

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

0
cancollide? tacotown2 119 — 5y
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 WillieTehWierdo200 966 — 5y
0
Yeah but I need it for every part/object in the whole game fr2013 88 — 5y
0
Nvm I solved it by myself all I had to do was enable TemporaryLegacyPhysicsSolverOverride in Workspace :/ fr2013 88 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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.

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 fr2013 88 — 5y
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. MarkHasReset 77 — 5y
Ad
Log in to vote
-2
Answered by 5 years ago
Edited 5 years ago

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
0
And you expected to get reputation from this? You know there's a comment section right? User#19524 175 — 5y
0
dude. if reputation is not money then y i need it im just helping a man here TheluaBanana 946 — 5y
0
plus im just using this as a placholder to get back to when im more free TheluaBanana 946 — 5y
0
Didn't really help me but thanks for trying anyways fr2013 88 — 5y
0
ok TheluaBanana 946 — 5y

Answer this question