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)

5 comments

0

Is it a local script or a script? I think local scripts make it only work for the client and not for everyone.

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.

0

If the game is Experimental Mode disabled, please tell and I would be able to answer the question fully.

0

GG coded wealth, you just copied my text and added some stuff....

0

@Coded I'm using FE in a local script