#Why won't this procedural animation work when it's a StarterCharacter?

1 messages · Page 1 of 1 (latest)

zealous crow
frank compass
# zealous crow

why you are doing 2 loop instead of one and you are not updating the position of the part (the blue part) that the IK is attached to

zealous crow
#

it was on a tutorial

zealous crow
frank compass
#

do you have any error in your output?

zealous crow
#

nope

#

except for Infinite yield possible on 'Workspace.[user]:WaitForChild("Torso")'

zealous crow
zealous crow
#

uh ok

zealous crow
manic badger
#

go to that line

zealous crow
#

no script

#

again

#

when i click it it does nothing

#

oh it didnt appear this time

#

nvm it did

crisp locust
# zealous crow no script

ye cus startercharacterscriot copies over the script to a character so when u stop the game that script gets deleted so when u click on it in the output it goes nowhere. js go to the same line in the script it said to

zealous crow
#

It didnt

#

say

#

a script

#

or the line

#

of a script

#

help

fleet mantle
#

To sum it up

#

Infinite yield is like

#

It can’t find it

#

So maybe the torso has a lowercase?

#

It’s case sensitive so you gotta fix it if there is any mistakes

#

If not then is it in the right path?

zealous crow
#

no thats not the issue

#

thats just there

#

i know what infinite yield is

fleet mantle
#

So then isn’t it that?

zealous crow
#

no

#

the script itself is giving no errors

fleet mantle
#

Then why is there a warning

#

I see

#

I’ll take a look in a sec just let me get my computer up

zealous crow
#

k

fleet mantle
#

Your legs don’t move because inside your IkLegStep function you overwrite the step settings

zealous crow
#

what.

fleet mantle
#

bruh

zealous crow
#

but it works with the npc?

zealous crow
fleet mantle
#

oh i see

#

sorry ill summerize it

#

It works on NPCs but not when you play because the raycast is hitting your own character instead of the ground. Add your character to the raycast ignore list so the raycast can see the floor

#

is that good?

#

So maybe change this

rayCastParams.FilterDescendantsInstances = {enemy}

#

with this

#

rayCastParams.FilterDescendantsInstances = {enemy, game.Players.LocalPlayer.Character}

#

tell me if it works

zealous crow
#

k

#

didnt work

#

the issue is

#

that the script isnt starting up

#

cuz the squares are supposed to go invis

#

but they dont

#

its prob smt with the modulescript

#

or the script can't call iklegstep()

#

one of the two

#

i just dk how to fix it

fleet mantle
#

ohh i see the problem lol

#

Your script never starts because require() cannot find your module

#

Replace /moduleLocation/.ProceduralModule with the actual location of the ModuleScript

#

because module isnt really a thing

#

sorry moduleLocation

#

isnt a thing

#

like script.Parent.Module or wherever it is in your game

untold swallowBOT
#

studio** You are now Level 2! **studio

fleet mantle
#

tell me what happens

zealous crow
#

so...

#

game.ReplicatedStorage.ProceduralModule

fleet mantle
#

should be right yeah

zealous crow
#

nope

fleet mantle
#

really

#

hm

#

is there anything in output?

#

how did you type the line

zealous crow
#

local ProceduralModule = require(game.ReplicatedStorage.ProceduralModule)

fleet mantle
#

yeah thats right

#

check output

zealous crow
#

nothing

fleet mantle
#

so you have another script that runs the module?

#

like a localscript

zealous crow
#

the script itself runs it

#

at the end

#
while true do
        ProceduralModule:IkLegStep(leftFront_IkTarget, leftFront_RaycastPart, enemy.PrimaryPart, 2, 2, 1, 0.05, rayCastParams)
        task.wait(0.1)
        ProceduralModule:IkLegStep(rightBack_IkTarget, rightBack_RaycastPart, enemy.PrimaryPart, 2, 2, 1, 0.05, rayCastParams)
        task.wait(0.1)
        ProceduralModule:IkLegStep(rightFront_IkTarget, rightFront_RaycastPart, enemy.PrimaryPart, 2, 2, 1, 0.05, rayCastParams)
        task.wait(0.1)
        ProceduralModule:IkLegStep(leftBack_IkTarget, leftBack_RaycastPart, enemy.PrimaryPart, 2, 2, 1, 0.05, rayCastParams)
        task.wait(0.1)
end
#

IkLegStep() is defined in the module

fleet mantle
#

hmm give me a sec ill check the script out again

zealous crow
#

k

#

btw the module is a modulescript

fleet mantle
#

yeah

zealous crow
#

and the script in the startercharacter is a script

fleet mantle
#

wait so

#

this

#

is the startercharacter?

zealous crow
#

thats the module

fleet mantle
#

okay ill need both if there is two scripts

zealous crow
#

thats IN the module

fleet mantle
#

yes

zealous crow
zealous crow
fleet mantle
#

oops i didnt see that one

#

maybe its the way you defined/named them

#

The code is looking for LeftFront, LeftBack, RightFront, and RightBack

zealous crow
zealous crow
#

wait no it isnt

#

so confusing

fleet mantle
#

yes its very confusing

#

i think it is the way you defined it

#

just try it

#

maybe like this

local leftFront_IkTarget = ikTargets:FindFirstChild("LeftFront")
local leftBack_IkTarget = ikTargets:FindFirstChild("LeftBack")
local rightFront_IkTarget = ikTargets:FindFirstChild("RightFront")
local rightBack_IkTarget = ikTargets:FindFirstChild("RightBack")

#

The part name in the workspace must still match the string inside FindFirstChild()

zealous crow
#

yeah

uncut delta
#

why not table

fleet mantle
#

?

zealous crow
uncut delta
zealous crow
#

wdym

#

i downloaded his thing

#

the model

#

script*

fleet mantle
#

yeah then they made a mistake maybe

untold swallowBOT
#

studio** You are now Level 3! **studio

zealous crow
#

actually

#

ppl in the comments were saying

#

that it wasnt working with startercharacter

fleet mantle
#

yeah then thats the problem

#

go inside the model

#

what are the names of the legs

fleet mantle
zealous crow
fleet mantle
#

yeah so

#

you probably just need to define them right

#

Your model uses 6 legs

#

but the script is written for 4 legs

#

It’s looking for LeftFront LeftBack RightFront RightBack

uncut delta
#

lol for real?

fleet mantle
#

prettyy sure

#

yes

uncut delta
#

lol

fleet mantle
#

dont make fun of me im doing my best to help this guy

uncut delta
#

what not at all, that's hilarious

#

they took some random tutorial's code, then started changing parts of it without changing any of the code assuming it could magically read their mind and do the new thing

fleet mantle
#

how so

#

ohh i see

#

yeah youre right

uncut delta
#

like taking a humanoid, adding legs to it and asking "Why isn't it changing to a quadruped? I added extra legs!!" spanishkek

fleet mantle
#

yeah so he probably either has to rename the stuff or just code it entirely for 6 legs

uncut delta
#

you gotta do a lot more than just rename stuff if you want to turn 4 legs into 6

#

the walk cycle would be completely different

fleet mantle
#

yeah true

#

guess its out of my control

uncut delta
#

i mean you could sit here and give them the code for 6 legs but here's to betting if they thought it could automagically change the walk cycle they have no clue how to adjust the code

fleet mantle
#

obviously i wont code for 6 legs

#

i shouldnt really waste my time

#

maybe some advice for him is good

#

local leftFront_IkTarget = need(ikTargets, "LeftFront")
local leftMiddle_IkTarget = need(ikTargets, "LeftMiddle")
local leftBack_IkTarget = need(ikTargets, "LeftBack")
local rightFront_IkTarget = need(ikTargets, "RightFront")
local rightMiddle_IkTarget = need(ikTargets, "RightMiddle")
local rightBack_IkTarget = need(ikTargets, "RightBack")

#

just define it like that and go from there

untold swallowBOT
#

studio** You are now Level 4! **studio

fleet mantle
#

its bad advice but literally what am i supposed to do

uncut delta
zealous crow
fleet mantle
#

i can debug my own code 100%

#

but uh others are just hard

uncut delta
fleet mantle
#

you mean the server?

uncut delta
#

i mean to roblox

fleet mantle
#

or literally being a roblox dev

#

oh no ive been a roblox dev for a while

#

just only by myself with a few friends maybe

#

but ive only been the only coder

uncut delta
#

so no roblox dev guilds i take it

fleet mantle
#

no

uncut delta
#

okay then yeah that explains it hehe

fleet mantle
#

hope thats not a bad thing

uncut delta
#

nah not at all

zealous crow
#

so

#

is there a solution

uncut delta
#

just says that you haven't yet figured out to bear in mind the roblox demographic

#

roblox targets young audience, and when kids see games like steal a brainrot and grow a garden and how simple they seem on the surface they think they can create it in a day with zero experience

fleet mantle
uncut delta
#

it's that point where ai can code anything and games are made in a day

fleet mantle
#

yeah ai is pretty crazy

#

its more rewarding when i do it myself

uncut delta
#

not true of course but they don't know that

fleet mantle
#

do you got any advice?

uncut delta
# zealous crow is there a solution

yeah the solution is to learn from the tutorial instead of copy+pasting it and expecting it to read your mind when you change things about it

zealous crow
#

it said "either download the model or make your own system"

#

so uh...

#

yeah

fleet mantle
#

im out for this sorry

zealous crow
#

gg

untold swallowBOT
#

studio** You are now Level 13! **studio

zealous crow
#

that

#

i cant fix it

uncut delta
# zealous crow i cant fix it

well someone who knew what they were doing could fix it. but if you don't know what you're doing then yeah you either can't fix it or you're going to have a very hard time fixing it

#

you'd need a whole host of debugging skills which you don't seem to have

#

if you did you probably wouldn't be asking just broadly "it no worky, why not agony "

#

you'd instead be saying you tried X, Y, and Z and can't trace the bug

#

you'd also have a very clear explanation of what's wrong with it

#

-- but see if you could do those 2 things, you'd probably be able to fix it on your own

zealous crow
#

i know nothing beyond basics of lua

uncut delta
zealous crow
#

yeah but

uncut delta
#

i'd almost wager you don't actually understand what it is this tutorial is showing you

zealous crow
#

spider robot

uncut delta
#

yeah

#

you just glazed over at the sight of a spider robot and said i want

#

like a baby reaching for candy they can't have

zealous crow
#

yeah

#

i dont wanna give up on this tho

#

i spent all day on this

uncut delta
#

do you even understand what ik is

zealous crow
#

from what i understand

#

its where it makes bones do physics stuff

#

and rotate/move

#

to try to connect point A and point B

uncut delta
#

animations makes bones do physics stuff and rotate/move and connect point a and point b too, what's the difference?

zealous crow
#

well

#

this reacts to terain

#

terrain

#

the rain

uncut delta
#

well you're not wrong i can say that much

zealous crow
#

I've used IK in animations before

#

-just not gameplay

#

wait

#

so am I screwed

#

or is there still hope

uncut delta
#

yea you can't just throw a humanoid on that and expect it to work

#

animate.lua is also not built for it

#

you need to do extra work if you want a player to control this

#

PlayerModule can't handle it either

#

which is roblox's default player controls script which handles movement inputs

#

you'd have to effectively make your own input handler

#

so movement inputs translate to sane outputs by the ik solver and movement of the body in general

zealous crow
#

and....

#

i have no idea how to do that

#

so its just not gonna work

#

and i wasted my day

zealous crow
#

or a no

uncut delta
#

an unsuccessful result is not waste

#

you most certainly learned something along the way, that's what counts

#

in fact going into any coding exercise expecting to get it perfect and correct on your first try is naive at best and utterly delusional at worst.

#

some problems take longer than a day, that's one thing you have learned 👍

zealous crow
#

uhhh so what do i gotta do

#

cuz this is for a game me n my friends are working on

#

and i cant just scrap the whole thing

uncut delta
#

well keep debugging and investigating the problem

#

take debugging steps

zealous crow
#

what are the debugging steps

#

sorry if im asking a lot, im very new to scripting

uncut delta
#

well, for starters, lots and lots of googling and learning things

#

second, well, debugging is ubiquitous and is the same for all coding

zealous crow
#

ok

zealous crow
#

ill let u know what i've gotten tmr

uncut delta
#

as if i dont have anything better to do lol