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)
``