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

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

Asked by 3 years ago
Edited 3 years ago

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

0
Did you publish it? (the place) kom297 -4 — 3y
0
Yes yumaking 78 — 3y
0
Is the animation created by you or your group (if it's a group game)? AntiWorldliness 868 — 3y
0
the animation is created by me yumaking 78 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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

0
wait so do I need to do that for animations yumaking 78 — 3y
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 FluffySheep46209 369 — 3y
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 yumaking 78 — 3y
0
Well that would only be the reason i'm not sure about drafts with group games FluffySheep46209 369 — 3y
View all comments (2 more)
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 yumaking 78 — 3y
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 yumaking 78 — 3y
Ad

Answer this question