#How To Go About Foot Plants In Roblox Studio (With R6 Characters)
1 messages · Page 1 of 1 (latest)
Hey i found it
?
Can u explain more what you are trying to accomplish
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
Ohh
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...
hello?
One second im talking to a mod regarding my role sorry
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
I'm confused
https://create.roblox.com/docs/animation/inverse-kinematics check the video with the guy moving?
I'm confused on what it is that you're wanting to achieve
omg
And IK constraints work because of the way that Motor6Ds connect the rig
I did, I'm sorry, I just don't really understand what it is exactly that you're having trouble with.
Want to go on call
Are you saying you want the bottom-most leg component to be parallel to the ground anytime the character is grounded?
Ohh
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
Okay so how much progress have you made so far
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?
My bad im back
k
So I think you could start off by connecting a new function to RunService.PreAnimation event
k
k
yeah i think this will work
but i think if i add like a part on top of the
legs
kinda like this
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
kinda like this
sry for the audio
i dont pause things
u see how the legs
like rotate
down like this
when it goes down
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
back
Also at the start of the script create an IKControl instance, and set its properties accordingly, refer to roblox documentation
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
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
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.
You can modify the SmoothTime of the IKControl instance instead lol
Wanna know something funny
yeah sure
I never used IKControl in a project before but instead I learned it just now to help you 🤑
Lol
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
Facts I low-key wanna try it tommorow when I'm more awake lol
k
win win
thx
ive been trying to do this
but i didnt know how to
but im thank ful thank so much
No problem happy to help 😊
You had to wait a while lol I got distracted by the ranker ticket I'm working on lol
Can you vote up this xD https://discord.com/channels/448986884497211392/982027942995566634
yeah sure whihc one?
The most recent one 😄
** You are now Level 11! **
yeah i voted
Thank you!!
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
Ayyy ummm 🤔
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
My bad I'm back but I'm going to bed now ill hit you up in the morning?
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
** You are now Level 9! **
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