I made a robot pet looking thing, rigged him, animated, all that. He just doesn't follow me.
Here is the script:
local enmhum = script.Parent.Humanoid local anm = script.Parent.Humanoid.Animation local load = script.Parent.Humanoid:LoadAnimation(anm) while wait() do for i, v in pairs(game:GetChildren())do local character = game.Workspace:WaitForChild(v.Name) enmhum:MoveTo(character.PrimaryPart.Position) load:Play() enmhum.MoveToFinished:Wait(1) load:Stop() end end
It's a normal script located inside the model. Thanks to anyone who helps :)
local enmhum = script.Parent.Humanoid local anm = script.Parent.Humanoid.Animation local load = script.Parent.Humanoid:LoadAnimation(anm) game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) while wait() do enmhum:MoveTo(character.PrimaryPart.Position) load:Play() enmhum.MoveToFinished:Wait() load:Stop() end end) end)
Try this
local enmhum = script.Parent.Humanoid local anm = script.Parent.Humanoid.Animation local load = script.Parent.Humanoid:LoadAnimation(anm) while wait() do local character = game.Workspace:FindFirstChild("TabooAntonioiscool") if character then enmhum:MoveTo(character.PrimaryPart.Position) load:Play() enmhum.MoveToFinished:Wait() load:Stop() end end
Would this work?
local enmhum = script.Parent.Humanoid local anm = script.Parent.Humanoid.Animation local load = script.Parent.Humanoid:LoadAnimation(anm) game.Players.PlayerAdded:Connect(function(player) while wait() do local character = player if character then enmhum:MoveTo(character.PrimaryPart.Position) load:Play() enmhum.MoveToFinished:Wait() load:Stop() end end end)