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

How to make animations replicate?

Asked by
Meqolo 78
6 years ago

So, I'm trying to animate a tool, for some reason the animation will only replicate on the screen of the player who has the tool equipped.

Code:

local Tool = script.Parent
wait(1)
local HoldTrackAnim = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.ShotgunHoldAnim)
HoldTrackAnim.Priority = Enum.AnimationPriority.Action
local Equipped = Instance.new("BoolValue", script)

Tool.Parent.Equipped:Connect(function(Mouse)
    Equipped.Value = true
    while Equipped.Value == true do
        HoldTrackAnim:Play()
        wait(1)
    end
end)

Tool.Parent.Unequipped:Connect(function()
    Equipped.Value = false
    HoldTrackAnim:Stop()
end)
0
Is it a local script or a script? I think local scripts make it only work for the client and not for everyone. DanielDeJong3 158 — 6y
0
Since the script is inside of a tool I see, if it is a local script it will only animate for the client. Also if the game is Experimental Mode Disabled (Filtering Enabled) then you would have to use a remote event or function with a script inside of server scripts, workspace, etc. to get the animations to be server wide, not client only. CodedWealth 21 — 6y
0
If the game is Experimental Mode disabled, please tell and I would be able to answer the question fully. CodedWealth 21 — 6y
0
GG coded wealth, you just copied my text and added some stuff.... DanielDeJong3 158 — 6y
0
@Coded I'm using FE in a local script Meqolo 78 — 6y

Answer this question