I’m working on a prop hunt game, my plan is that when you change into a prop, everything in the character apart from the Prop that you’re hiding as cannot collide with the map so that what happens in the gif below doesn’t happen.
PhysicsService:CollisionGroupSetCollidable("Hiders", "Default", false)
for _, Object in pairs(Character:GetDescendants()) do
if Object:IsA("BasePart") then
if Object.Name ~= "Prop" then
PhysicsService:SetPartCollisionGroup(Object, "Hiders")
end
end
end
--Code I use to weld the prop
local Prop = Props[Prop]:Clone()
Prop.Name = "Prop"
local Weld = Instance.new("Motor6D")
Weld.Part0 = Character.HumanoidRootPart
Weld.Part1 = Prop
Weld.C0 = CFrame.new(0, (-2.35 + Prop.Size.Y/2),0)
Weld.Parent = Prop
Prop.Parent = Character
That’s my code, but for some reason it does what you see in the gif below.
Try getting humanoid.HipHeight to the right value. It appears the character is falling into the paper, pushing it down and causing pysics to be confused.
Are you using a Weld or a Motor6D? Motor6D is what you should be using to weld your paper to the HumanoidRootPart. If you are then you should take a look at the parts in your character and look at their collision group ids to make sure they’re right.
It’s a Motor6D, I believe @REALTimothy0812 is correct and I need to adjust the hip height though I’m not sure how to automate it as I don’t think it’s productive to try and figure out what the hip height should be for each prop in my game.
Interestingly when I was trying to create a working version of what you have, I stumbled upon a bug:
Basically it works exactly as you wanted it to, except unfortunately it doesn’t respect collisions for the bottom part if I jump or fall when colliding (16s in vid). I’ll probably file a bug report about it but if you’re still determined with using Humanoids then you might have to do something about your original character. I would create a “prop character” and create that / destroy your previous character as soon as you try to switch characters.
Edit: It’s very brief but at 5s in the vid you can see that the bottom right part interacts with my floor piece, meaning I do have collision with it, just not if I’m walking.
Edit2: To fix the jumping, I just made the HRP not collide with default. This however does mean you have to make a “floor” collider for the HRP’s new collision group to interact with.
I have mine set up differently. You need to set up a “Floor” collision group for your HRP to stand on. You need it to do that for physics to interact with the part, otherwise it’s always in freefall.
And yeah it’s essentially that. You need a Humanoid and a primary part for the model as well if you’re continuing that route.
I’ll try the new character method because that seems like it would be the best way to go about it imo as it means I won’t have to deal with a ton of collision groups, thanks for the help!
I guess I’ll need to figure out how to automate the hip height for each prop though. I’m guessing it’s not as simple as just being HipHeight = Prop.Size.Y