Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

So I have animations and they work fine in studio but not the published game, why does this happen?

I have a tool that plays an animation when clicked and some other stuff, here is the code:

--Script(Server)
local tool=nil
local char=nil
local effect=nil

script.Parent.Activated:Connect(function()
tool=script.Parent
char=tool.Parent
local id=tool.animParent.Animation
local anim=char.Humanoid:LoadAnimation(id)
wait()
game.Workspace.GearSecond.Playing=true
effect=Instance.new("Smoke",char.HumanoidRootPart)
effect.RiseVelocity=0.2
effect.Size=0.1
char.Humanoid.WalkSpeed=50
anim:Play()
end)

script.Parent.Unequipped:Connect(function()
effect:Destroy()
char.Humanoid.WalkSpeed=16
end)

keep in mind this works the exact way I want it to in studio, the player clicks the tool the animation plays the sound plays and they get the effect, and when they unequip the tool the effect disappears. But I published the update to the game and the animation doesn't play I am wondering if this has something to do with the fact that the game is on team create but I am not sure.Or do I have to use a local script or a Remote Event for Animations? If this helps the script is inside a tool with an animationcontroller and animation inside, looks like this:

v Tool Script v Animation Controller Animation

4 comments

0

Did you publish it? (the place)

0

Yes

0

Is the animation created by you or your group (if it's a group game)?

0

the animation is created by me

1 answer

Roblox has added a new feature called drafts in roblox studio, you need to publish your scripts now. You don't need to publish your scripts to work in roblox studio. To turn it on its under the view tab in roblox studio

6 comments

0

wait so do I need to do that for animations

0

You need to publish every script if you want it to be in your game, the feature is soo people can leave with scripts in progress or scripts which might lead to bugs, alone and check them people they get published

0

Also i know about drafts and used it but, it is not their in my view tab cuz I am making changes in personal version of the game and publishing the changes to the group game, do I need to change the group game directly?Also I doubt that is the problem because  I have published updates to the game multiple times and the changes to script were saved to the group game

0

Well that would only be the reason i'm not sure about drafts with group games

0

ok so i realise that it works in the published version of my game on the private place but not the group version, so I think it definitely has something to do with drafts or team create, I am going to try making changes directly to the group game

0

so making changes to the group game directly didn't help can someone give another answer to help? Please anything you think the issue might be

This discussion is preserved as it was. New answers, comments, and votes are closed.