#18:54:20.172 LoadAnimation requires the asset id to not be empty - Server - AI Chase:46
43 messages · Page 1 of 1 (latest)
Would you want us to guess the code?
yes
function playDanceAnimation()
local humanoid = NPC:FindFirstChildOfClass("Humanoid")
if humanoid then
local animationId = "rbxassetid://14359851532"
local animationTrack = humanoid:LoadAnimation(Instance.new("Animation"))
animationTrack.AnimationId = animationId
animationTrack:Play()
animationTrack.Stopped:Wait()
end
end
This may work. (I may have the caps wrong)
function playDanceAnimation()
local humanoid = NPC:FindFirstChildOfClass("Humanoid")
if humanoid then
local animationId = "rbxassetid://14359851532"
local animationTrack = Instance.new("Animation")
humanoid:LoadAnimation(animationTrack)
animationTrack.AnimationId = animationId
animationTrack:Play()
animationTrack.Stopped:Wait()
end
end
Tell me if it worked.
alr i try it now
Workspace.Rarity Npc.Smart Npc.AI Chase:49: attempt to index nil with 'new'
Hmm
Give me a sec
This is LUA right?
I mean......
luau
Let me make you a simple script hold on.
i fixed it
function playDanceAnimation()
local humanoid = NPC:FindFirstChildOfClass("Humanoid")
if humanoid then
local animationId = "rbxassetid://14359851532"
local animationInstance = Instance.new("Animation") -- Create a new instance of the "Animation" class
animationInstance.AnimationId = animationId -- Set the animation ID for the new instance
local animationTrack = humanoid:LoadAnimation(animationInstance) -- Load the animation using the instance
animationTrack:Play()
animationTrack.Stopped:Wait()
end
end
but ty for your help
Honestly.
** You are now Level 1! **
Thats normal luau, nothing wow
i have a new problem
20:32:30.273 Position is not a valid member of Model "Workspace.Rarity Npc.Smart Npc" - Server - AI Chase:189
for i = 1, numPoints do
local randomPoint = Vector3.new(
NPC.Position.X + math.random(-maxDistanceFromPath, maxDistanceFromPath),
0,
NPC.Position.Z + math.random(-maxDistanceFromPath, maxDistanceFromPath)
)
Is LUAU LUA?
nope
Im so confused.
luau is lua but with big changes
Lua is the original language
Luau is the language lua but a little bit changed to work for Roblox
what is the rpoblem here
luau is just for Roblox Studio
Oh then I am using LUAU
luau has everthing lua has but in adition with stuff like "script", "parent", "position", everything that is used in a game engine
tip: dont use space for instance's names
And what kind of instance is "NPC"?
that the instance right?
local NPC = game.Workspace["Rarity Npc"]["Smart Npc"]
Yes, but what type of instance is it?
Model