#NPC slides when moving, need it to walk
1 messages · Page 1 of 1 (latest)
Well could you provide the script in which you play the walk animation
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
Well I never made a Npc using the default roblox rig but I am pretty sure that you have to play the animation yourself.
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
I wouldn't recommend using chatgpt to code something for you then like this -
Only ask ai to teach you something not to make you something
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
The important thing is: In these videos they also get explained how it is made
so you can understand it
well typically i ask chatgpt after it makes something for me how each bit of code works
** You are now Level 1! **
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?
I watched tutorials and tried to replicate what they did in those tutorials but slightly different.
How many games u made/how long u been scripting
i am trying to make a hood style game
1 year now. I've only made one crappy game but im working on a decent (In my opinion) game now.
🧐 🧐 🧐 🧐 🧐 🧐 🧐
the problem is that
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