print("yea here for some reason")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Model = ReplicatedStorage:WaitForChild("StandModel")
if Model then
print("model exists")
local function findHumanoid(model)
for _, child in pairs(model:GetDescendants()) do
if child:IsA("Model") and child:FindFirstChild("Humanoid") then
return child:FindFirstChild("Humanoid")
end
end
return nil
end
while true do
for _, child in pairs(Model:GetChildren()) do
print("Child Model:", child.Name)
local Humanoid = findHumanoid(child)
if Humanoid then
print("found humanoid in child model")
local Animator = Humanoid:FindFirstChild("Animator") or Instance.new("Animator", Humanoid)
if Animator then
print("animator instance", Animator)
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://103480708667499"
local success, message = pcall(function()
Animator:PlayAnimation(Animation, "Idle")
end)
if not success then
warn("Failed to play animation: " .. message)
end
else
warn("Failed to create Animator instance")
end
end
end
-- Wait 1 second before checking again
wait(1)
end
else
warn("Failed to find Model")
end