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

LocalScript Failure - UI works in studio, not in game, why?

Asked by
BryanFehr 133
4 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)

2 answers

Log in to vote
0
Answered by 4 years ago

I think it is because you have it local, but the server doesn't see it, so you aren't viewed as local because you are in a server. For example, when you play a game, you're in a server. When you make one in studio, play test it there, it's local. But there are different meanings of local, like place, view, POV things like that.

0
Otherwise, I have NO idea. Cvllapse 30 — 4y
Ad
Log in to vote
0
Answered by
BryanFehr 133
4 years ago

Solved, Code isn't the issue. If YOU or ANYONE you know is working with ROBLOX Studio and animations, BE SURE to do those animations in the game you've meant to do them in! If you try to do animations in another place, and transfer the ID's over, IT WILL NOT WORK!

Answer this question