#How To Go About Foot Plants In Roblox Studio (With R6 Characters)

1 messages · Page 1 of 1 (latest)

sly geyser
#

I'M having a bit of problems making a footplant system and i was asking for ways on how i can do it a good start would be a r6 blender rig the things on top of the legs.

tame night
#

Hey i found it

sly geyser
#

?

tame night
#

Can u explain more what you are trying to accomplish

sly geyser
#

no like u know if u try to animate a rig like that

#

and then u puss its torso down

#

the top of the legs goes down but not out of bounds

#

its like that

tame night
#

Ohh

sly geyser
#

but when the player is walking and u get it

#

In this video, you will learn how to use inverse kinematics (IK) to make your characters walk like a pro on any terrain. You will see how IK can improve your animations by keeping the feet on the ground, adjusting the foot rotation and angle, and moving the hips and knees accordingly. You will also learn how to implement IK in your own project u...

▶ Play video
#

hello?

tame night
#

One second im talking to a mod regarding my role sorry

sly geyser
#

k

#

brb

#

back

tame night
#

You have to edit the Motor6Ds

#

Why can't you use the animation system?

sly geyser
#

NO

#

thats not how it works

#

i want to make it that when the leg collides with a part or any objects

#

the other leg goes up

#

u would have to check out footplant for roblox

#

if i use motor 6ds it wouldnt work liek this

tame night
#

I'm confused

sly geyser
tame night
#

I'm confused on what it is that you're wanting to achieve

sly geyser
#

omg

tame night
#

And IK constraints work because of the way that Motor6Ds connect the rig

sly geyser
#

yeah

#

but

#

did u look at the cideo

#

video it looks like this

tame night
#

I did, I'm sorry, I just don't really understand what it is exactly that you're having trouble with.

sly geyser
#

with the guy walking

#

OMG

tame night
#

Want to go on call

sly geyser
#

sure

#

but i dont have a mc

#

mic

tame night
#

Are you saying you want the bottom-most leg component to be parallel to the ground anytime the character is grounded?

sly geyser
#

so i have to show u example

#

yes

tame night
#

Ohh

sly geyser
#

when the legs collide with the ground

#

yes

#

the legs go up

#

and when theres nothing to collide with it would just return to its original pos

tame night
#

Okay so how much progress have you made so far

sly geyser
#

0%

#

i dont rly get it

#

just asking for ways on how i can pull it off

#

u there or are u just doing that thing again?

tame night
#

My bad im back

sly geyser
#

k

tame night
#

So I think you could start off by connecting a new function to RunService.PreAnimation event

sly geyser
#

k

tame night
#

Within this function:
Create a ray using workspace:raycast

sly geyser
#

k

#

yeah i think this will work

#

but i think if i add like a part on top of the

#

legs

#

kinda like this

tame night
#

You can put this into a localScript inside of StarterCharacterScripts, so that it runs each time the character spawns.
Set a variable for the character, script.Parent, and create one attachment for each leg, and have it parented to the humanoidRootPart

sly geyser
#

sry for the audio

#

i dont pause things

#

u see how the legs

#

like rotate

#

down like this

#

when it goes down

tame night
#

Then, within the function you previously connected to RunService.PreAnimation, let's call it OnStepped, you can use the HitPosition result from the Raycast to then place the attachments at the correct position using attachment.WorldCFrame = CFrame.new(HitPosition)

#

Make one raycast for the right leg and one raycast for the left leg

sly geyser
#

back

tame night
#

Also at the start of the script create an IKControl instance, and set its properties accordingly, refer to roblox documentation

sly geyser
#

k

#

yeah liek i was saying i wanted to add a part ontop of the leg

#

so it doesnt go out of bounds

#

u know

tame night
#

You need one IKControl instance for each leg.

#

Ohh

sly geyser
#

yeah but ill add like a delay

#

so its ssmooth

#

u know

#

im also gonna make it in a module

#

so for scripts like vaulting over objects

#

it doesn look werid so i can disconnect it when i want

tame night
#

Yeah you can modify the EndEffectorOffset to a blank CFrame where the Y coordinate is equal to half the Y size of the area which extends past the boundary of the leg.

tame night
#

Wanna know something funny

sly geyser
#

yeah sure

tame night
#

I never used IKControl in a project before but instead I learned it just now to help you 🤑

#

Lol

sly geyser
#

LOL

#

i like having this in games cause it provides

#

realism to the animations

tame night
#

I'll probably end up trying this out later tho, I've just never really worked with it. However I'm very skilled in attachments, the physics engine, rendering, animations, and general coding so it wasnt very difficult. The documentation can be a huge help, sometimes it's even more important to practice interpreting the roblox API docs than to memorize the API. This is especially true for the more rarely used engine features like IKConstraints lol

tame night
sly geyser
#

k

#

win win

#

thx

#

ive been trying to do this

#

but i didnt know how to

#

but im thank ful thank so much

tame night
#

No problem happy to help 😊

#

You had to wait a while lol I got distracted by the ranker ticket I'm working on lol

sly geyser
#

yeah sure whihc one?

tame night
#

The most recent one 😄

hazy martenBOT
#

studio** You are now Level 11! **studio

sly geyser
#

yeah i voted

tame night
#

Thank you!!

sly geyser
#

yo bro i tried what u told me it didnt work and when i made my own it didnt work either

#

@tame night

#

@sly geyser

tame night
#

Ayyy ummm 🤔

sly geyser
#

this is mine

#

i dont know whats wrong

#

i have a local script that runs it in the starter character too

#

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local R6Footplanting = require(ReplicatedStorage.Storage.Modules.IK)

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
character:WaitForChild("HumanoidRootPart").Anchored = false
humanoid.PlatformStand = false
humanoid.JumpPower = 40

if humanoid.RigType ~= Enum.HumanoidRigType.R6 then
return
end

local leftFootplant = R6Footplanting.new(character, "Left Leg", 1, 0.5)
local rightFootplant = R6Footplanting.new(character, "Right Leg", 1, 0.5)

RunService.RenderStepped:Connect(function()
if humanoid:GetState() == Enum.HumanoidStateType.Freefall or humanoid:GetState() == Enum.HumanoidStateType.Jumping then
return
end
if leftFootplant then
leftFootplant:Update()
end
if rightFootplant then
rightFootplant:Update()
end
end)

humanoid.Died:Connect(function()
if leftFootplant then leftFootplant:Destroy() end
if rightFootplant then rightFootplant:Destroy() end
end)
player.CharacterAdded:Connect(function(newCharacter)
character = newCharacter
humanoid = character:WaitForChild("Humanoid")
character:WaitForChild("HumanoidRootPart").Anchored = false
humanoid.PlatformStand = false
humanoid.JumpPower = 40
if humanoid.RigType == Enum.HumanoidRigType.R6 then
leftFootplant = R6Footplanting.new(character, "Left Leg", 1, 0.5)
rightFootplant = R6Footplanting.new(character, "Right Leg", 1, 0.5)
end
end)

#

i dont know whats wrong

#

):

#

@tame night u there or

#

ok ima go to bed

tame night
#

My bad I'm back but I'm going to bed now ill hit you up in the morning?

sly geyser
#

actually i learned u dont need pre animation

#

only

#

RunService.Stepped

#

will work

#

and yes u just need to change that

#

simple thing for it to work

#

this also works on r6 and other things

#

a cool way u can do it is adding

#

attachments under the plrs feet

#

in the humanoid root part

#

and adding them inverse kidamatics to the humanoid

hazy martenBOT
#

studio** You are now Level 9! **studio

sly geyser
#

this works on anything

#

set the inverses to

#

transform

#

and u can just make it enable

#

when its on the ground

#

constantly for all inverses

#

the TARGET

#

should be one of the attachments below the legs of the plr in the hrp

#

for rp

#

for r6

#

the chainroot is going to be the to the right hip or the left hip motor 6ds

#

it depends on which leg

#

for the

#

end effector just right foot attachment

#

the Inverses work on both r6 and r15

tame night
#

That's so fking awesome lol thank you for the update!!!

#

I already could tell you were a good coder like me but I'm surprised at how quickly you got this done & even optimized it lol. I'm kinda proud of my role in contributing to this lol.