I made a custom animal for my game and put a humanoid and animate script in it. I tried making a script to make it move 5 studs but nothing happened. can’t figure out why.
You can put the script underneath the humanoid into starterCharacterScripts so that it will be added upon the characters creation assuming its the starterCharacter, alternatively you can add it on afterwards or do the action from a different location such as ServerScriptService, you also need to set the Humanoids hip height so that it won’t be relying on collisions with the goose’s mesh and the ground, you also have the Humanoids health set to 0 which is a bit weird but seems unrelated.
Set the duck’s Humanoid.HipHeight to 1.4 and then move the script into the duck’s Model instead of it’s Humanoid, then change the code to this.
while not game:IsLoaded() do
wait()
end
local character = script:FindFirstAncestorWhichIsA('Model')
local humanoid = character:WaitForChild('Humanoid', 5)
if humanoid then
humanoid:MoveTo(character:GetPivot().Position + Vector3.xAxis)
end
I should explain that Vector3.xAxis is just Vector3.new(1, 0, 0), I just did that to shorten the line a little. You can do whatever you want there though obviously.