Hello. i need to play animation and change object, but i got: ``RoboBug is not a part of Folder But actually this model is inside of folder Here is the code:
local robobug = script.Parent.Parent.Parent.RoboBug
local h = robobug.humanoid
local animation = robobug.Animate.walk.WalkAnim
local animationTrack = h:LoadAnimation(animation)
local eye1 = robobug.Eye1
local eye2 = robobug.Eye2
local e1 = robobug.e1
local e2 = robobug.e2
function OnTouch()
robobug.Animatronic_AI.Disabled = false
animationTrack:Play()
eye1.Color3 = e1.Value
eye2.Color2 = e2.Value
end
script.Parent.Touched:Connect(OnTouch)
(I know, maybe I'm big noob in coding, but please help).

1 comment
thanks