#NPC slides when moving, need it to walk

1 messages · Page 1 of 1 (latest)

umbral lodge
#

hey, hopefully this is an easy fix, please help! i have a block rig that moves around fine but it does not do the walk animation, it slides around

strong topaz
umbral lodge
#

local rig = script.Parent
local humanoid = rig.Humanoid
local root = rig.HumanoidRootPart

wait(3)

while true do
waitTime = math.random(1, 10)
wait(waitTime)

randomX = math.random(-30, 100) 
randomZ = math.random(-30, 100)

print("X is:", randomX)
print("Z is:", randomZ)

local targetPosition = root.Position + Vector3.new(randomX, 0, randomZ)

humanoid:MoveTo(targetPosition)
humanoid.MoveToFinished:Wait()

end

strong topaz
umbral lodge
#

chatgpt gave me this script and it seemed to work

#

local humanoid = script.Parent.Humanoid
local animator = humanoid.Animator

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://180426354"

local track = animator:LoadAnimation(animation)

humanoid.Running:Connect(function(speed)
if speed > 0 then
track:Play()
else
track:Stop()
end
end)

#

first week scripting so just trying to learn haha. Why this small code may take me about a half hour to wrap my head around

strong topaz
#

Only ask ai to teach you something not to make you something

umbral lodge
#

but, is not seeing how its made not one way to learn?

#

it seems people learn to script from videos which make things for them

strong topaz
#

The important thing is: In these videos they also get explained how it is made

#

so you can understand it

umbral lodge
#

well typically i ask chatgpt after it makes something for me how each bit of code works

errant ventureBOT
#

studio** You are now Level 1! **studio

umbral lodge
#

so i have it make smth for me then spend some time reading and remaking what it made for me a few times

#

how did you learn?

strong topaz
#

I watched tutorials and tried to replicate what they did in those tutorials but slightly different.

umbral lodge
#

How many games u made/how long u been scripting

#

i am trying to make a hood style game

strong topaz
umbral lodge
#

🧐 🧐 🧐 🧐 🧐 🧐 🧐

shy thicket
#

chat gpt is dum

#

dummy

#

he doesnt know how to script

#

if u use him to make and explain everything for you

#

he WILL

#

make a script that wont work

#

and explain the script that is not working in a way that it looks like it should work

#

If there's one thing that GPT chat is good at, it's explaining things in a convincing way.

#

It happens quite often

#

i cant even count how many times i was struggling with something and chatgpt straight up just made it even more confusing

#

something he IS GOOD

#

is in math

#

that i cant deny

#

but on scripting logic he is ass

umbral lodge
#

What do you know

#

U haven't even scripted before