Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Animation LocalScript - Works in studio, not in games, why?

Asked by
BryanFehr 133
5 years ago
Edited 5 years ago

Hello all! I've recently made a Animation GUI for my newly coming Club Game, Club Void, and I was wondering as to why the animation UI works in Studios but doesn't work when you play the game? The buttonclick works, but the animation won't run. Yes, I am aware that animations only work if the person who owns the game created them, and yes I did make these animations. I will provide a gyazo of what it looks like. Any and ALL help is appreciated!

gyazo - https://gyazo.com/5e7149ec84f08b22bf55f7eb791dd3e2

Code:

wait(3)
Player = game.Players.LocalPlayer.Character
animation1 = Player.Humanoid:LoadAnimation(script.Animation1)
CanEmote = true

script.Parent.MouseButton1Click:connect(function()
 local emote = math.random(1,1)
 if emote == 1 and CanEmote == true then
  animation1:Play()
  CanEmote=false
  wait(2)
  CanEmote=true
     end
     end)

Answer this question