How would I recreate this crate moving system?

I want to recreate the crate moving / object moving system from Uncharted 4.

I’m not even sure where I would start?

Any help?

Here are some references incase your not sure what I mean.


Pushing ^


Click [TRIANGLE] to start pushing

Once pushing wherever you walk you basically just push it in front of you, or drag it if you turn your camera, etc

I’m not sure if this is too difficult for ROBLOX, but definitely way too hard for me.
(Would like it on local client only)

The crates are used to move so the player can jump on to it, then onto the next platform.

Any help anybody ?

1 Like

You can use ProximityPrompt to interact for pushing the object,

to making a system for grabbing the object, there are tons of ways but i think most basic one is using Constraints to connect them to your avatar,

you can also use Raycasting to get surface normal for rotate the object to terrain surface

i dont really plan on using terrain, i just plan to slide the part on flat parts and wedges to be honest, would it still be RayCasting?

if you rig the object with constraints so good that makes it able to rotate, you do not even need to use raycasting

alright, ill check out the thinks you applied and then ill get back to you on how it is going with the process :smile:

update / attempt #1

I definitely did something wrong here, I used attachments for the grips, one on the box for the arm and the other one that is in the arm, (only doing the left arm so far).

I used a HingeConstraint, and its supposed to snap I believe???

But it didnt!
So what I tried to think of a solution, and thought well maybe its just not active! So lets throw this in the script!

Nope, here an error instead!
Unable to assign property Active. Property is read only - Server - Proximity:18

So, lets remove that whole thing and look at what I had before.

Really what I have here is making sure I have the parts in the character (there are a couple cause I just wanted to see that I was doing it correct).

Here is the print into the console after the player triggers the ProximityPrompt.

Here is the whole script. (ServerScript inside ProximityPrompt)

image
(SurfaceSelection just there so I remember what face the ProximityPrompt is on)

script.Parent.Triggered:Connect(function(player)
	--// Finding object & what player
	print("Object : "..script.Parent.ObjectText)
	print("Player Name : "..player.Name)
	
	--// Findng character + body parts
	local char = player.Character
	
	print("Character Head Found? : "..char.Head.Name)
	print("Character RightArm Found? : "..char["Right Arm"].Name)
	print("Character LeftArm Found? : "..char["Left Arm"].Name)
	
	--// Create Constraint(s)
	local LeftArmConstraint = Instance.new("HingeConstraint")
	LeftArmConstraint.Attachment0 = char["Left Arm"].LeftGripAttachment
	LeftArmConstraint.Attachment1 = script.Parent.Parent.Parent.Box_LeftArm
	LeftArmConstraint.Visible = false
	LeftArmConstraint.Enabled = true
	
end)

Box_LeftArm is the attachment I created inside the Crate for the player hand grip attachment to grip to.

Here is where the LeftGripAttachment attachment is.

Not sure if the part not being unanchored makes any changes to this, because I tried anchored and unanchored but nothing changed.

Any help for me being stuck.
Feel free to ask questions on anything I just said cause I get it, its a lot to read here in just this one post

i did not read everything i just look and see 2 issues, you should not rig it into hands, hands should be animated later with it’s own
i suggest to rig it to your humanoidrootpart

also don’t use hinge, i suggest to use align position, so you can add 2 attachments to in front of rootpart and add 4 attachments to object and connect them with alignposition

what do you mean by adding the extra 4 attachments to the object to connect them with AlignPosition?

also, just to verify, the Attachment0 should be the HumanoidRootpart.RootAttachment and the Attachment1 should be the Box_LeftArm attachment?

no, you have to make 2 attachments for humanoidrootpart and you have to add offset position to them like shown in the picture

i mean you have to add 4 attachments to each corner of the object and connect them to rootpart’s attachments with alignposition

with this your object will try to move in front of your rootpart

(sorry for late response. was at work)

I got something going so far.

Heres what my Crate looks like with all the attachments, but

For each one of the AlignPosition’s inside the Corners the Attachment0 is the parent and for Attachment1 the value is either Left or Right arm attachment which depends on which side the corners are on. Then when the prompt is activated the script makes two new AlignPositions in the HumanoidRootPart.
edit: what got it working aswell was adding LeftArmConstraint.Parent = char.HumanoidRootPart and RightArmConstraint.Parent = char.HumanoidRootPart to the Proximity script

It now has the player go to the Crate, but its very difficult to push. (It doesn’t really move…)
How would I get it to move better? Should I try to lift the crate off the ground a little bit?

Video of what I got.

EDIT 1

I changed the Attachment0 with Attachment1, and now the box goes to the player, but how would I add an offset to the AlignPosition, because I don’t see it in the properties?

^ im going to try to maybe changing the Attachment positions in Box_LeftArm and Box_RightArm

EDIT 2

Making the Attachments positions farther out worked!
Yet I still need to find a solution to make the part higher off the ground for easier moving because it kinda of gets caught on the floor.

Gonna try to make it calculate where the box is where its picked up and then change the Y value by +1

EDIT 3

IT WORKS!!! I GOT IT AFTER ALL THIS!

I changed a bunch of stuff in the PlayerModel + had it tween off the floor (which sorta works, its good enough)

Here is a model + video if anyone who sees this wants to use it.

crates are still a little glitchy, falling under player and what not but it works so /shrug

1 Like