Hey there, so ive been developing a game “The church of chicken” (dont ask please) and for some reason, animations play in studio but not client
code if it helps:
local debris = game:GetService("Debris")
function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then -- if a humanoid exists, then
anim_feet = humanoid:LoadAnimation(script.Parent.Animation)
current = anim_feet
current:Play()--How long until animation plays.
wait(1)
part.Parent:FindFirstChild("Torso").Anchored = true
local BadgeService = game:GetService("BadgeService")
local id = 2128274262
local badgegive = game.Workspace.SacrafisePole
badgegive.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if not BadgeService:UserHasBadgeAsync(plr.UserId, id) then
BadgeService:AwardBadge(plr.UserId, id)
end
end
end)
end
end
function onTouch2(part)
wait(10)
current:Stop()
part.Parent:FindFirstChild("Torso").Anchored = false
part.Parent:FindFirstChild("Humanoid").Health = 0
end
script.Parent.Touched:connect(onTouch)
script.Parent.Touched:connect(onTouch2)