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

Why is my script only working in studio and not on public servers?

Asked by 6 years ago

This script is only working in studio. I am trying to make a gui button play an animation

Player = game.Players.LocalPlayer
local Animation = Instance.new("Animation")
Animation.AnimationId = "http://www.roblox.com/asset?id=501371142"

function PlayAnimation()
local animTrack = Player.Character.Humanoid:LoadAnimation(Animation)
animTrack:Play()
end
script.Parent.MouseButton1Down:connect(PlayAnimation)


2 answers

Log in to vote
2
Answered by
phxtn 154
6 years ago
Edited 6 years ago

What type of animation is it? If it is R15 or R6 go to your game settings and only allow the type your doing. I think this will work becuase I had that same problem.

For example all my animations are for R6 so it wont work fro R15 so I have to go to game setting and change it so it only allows R6. And people with R15 mode will become R6.

Ad
Log in to vote
1
Answered by 6 years ago

It could be what PhotonLightning suggested, however if you play on a public server you can press CTRL + F9 in order to check any errors that have occured. Remember this, it can help you out a lot in the future.

Sometimes Studio just doesn't seem to want to show you all of the errors.

1
If it is what Photon said, how do I make it only R6. Here is a link to the error. https://gyazo.com/7a9e941026745942e55fa6ba39b81e79 racekppcar 1 — 6y
0
The error means the AnimationId isn't trusted, or doesn't actually exist. Goulstem 8144 — 6y
0
Exactly. You can only use Animations made by Roblox or yourself. You can't use other people's animations or it will give you that exact error. OrcaTheFish 95 — 6y
0
So should I try making a new animation because the one in the script is mine. racekppcar 1 — 6y
0
Probably... Sorry that I couldn't help further dude. OrcaTheFish 95 — 6y

Answer this question