I tried firing this event but it doesn’t work on the server firing it
here is the firing code
Tool.Equipped:Connect(function()
-- Make Motor 6D {first we need the player's character}
local Character = script.Parent.Parent.Parent.Parent.Parent
local Player = game.Players:GetPlayerFromCharacter(Character)
local RightHand = Character.RightHand
-- Creation of Motor6D
local Motor6D = Instance.new("Motor6D")
Motor6D.Name = "Motor6D"
Motor6D.Parent = RightHand
Motor6D.Part0 = RightHand
Motor6D.Part1 = Tool.SwordHandle
PLAY_ANIMATION_EVENT:FireClient(Player, "Hold")
CHANGE_MOUSE_EVENT:FireClient(Player, "WeaponMouseIcon")
end)
then the connector event in the Client
PLAY_ANIMATION_EVENT.OnClientEvent:Connect(function(AnimationName)
if AnimationName == "Hold" then
local HOLD_ANIMATION_TRACK = Humanoid:LoadAnimation(HOLD_ANIMATION)
-- Play it bruh lol
print("working")
HOLD_ANIMATION_TRACK:Play()
elseif AnimationName == "Swing" then
local SWING_ANIMATION_TRACK = Humanoid:LoadAnimation(SWING_ANIMATION)
local HOLD_ANIMATION_TRACK = Humanoid:LoadAnimation(HOLD_ANIMATION)
-- Play it bruh lol
print("working")
HOLD_ANIMATION_TRACK:Stop()
SWING_ANIMATION_TRACK:Play()
end
end)