#Animation doesn't load for mobile users

4 messages · Page 1 of 1 (latest)

full quail
#

I made a Button that when clicked it should play an animation but it doesn't work for mobile users ( and probably tablet user) but works fine with pc users

Here is the script for the button:
``​lua
local click = script.Parent.MouseButton1Down
local players = game:GetService("Players")
local char = players.LocalPlayer.Character

if not char then
players.LocalPlayer.CharacterAdded:Wait()
end

local hum = char:WaitForChild("Humanoid")

local animation = Instance.new("Animation")

animation.AnimationId = "rbxassetid://13316989854" -- your id

local animationtrack = hum:LoadAnimation(animation)

function playAnimation()
animationtrack:Play()

game.Workspace.Sign.SurfaceGui.SIGN.Visible = false

end

click:Connect(playAnimation)
``

full quail
#

i tested that

#

you can see at the bottom in the script that i made a text gui disappear if button is pressed(it was for testing) and it worked

#

so the button works but not the animation