#Please help 😭 tool animation plays only for the client

1 messages · Page 1 of 1 (latest)

quasi star
#

I don't know what to do anymore. I had this issue 8 days ago and it's broken again, I didn't even change anything. This issue is draining me mentally since I can't find a way to fix this and it's been weeks. I'll glady give permissions to anyone who wants to try and help with the issue in studio. This is the local script inside the tool, that plays the animation

#

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")

local Tool = script.Parent
local Grip = Tool.Connectors.Grip

local IdleAnim = script:WaitForChild("Idle")
local IdleTrack = animator:LoadAnimation(IdleAnim)

local Ui = game.ReplicatedStorage.ToolsUis:WaitForChild("PhoneGui")

Tool.Equipped:Connect(function()

local ScreenGui = Ui:Clone()
ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
IdleTrack:Play()
Grip.Part0 = Tool.Parent:WaitForChild("Right Arm")

end)

Tool.Unequipped:Connect(function()

IdleTrack:Stop()
Grip.Part0 = nil

end)

still slate
#

are u using a local script?

#

bcz if so i recommend putting all the animations part in a regular one cuz the local script just appears for the client

potent wedgeBOT
#

studio** You are now Level 9! **studio

quasi star
quasi star
#

lemmie send it, wait a sec

quasi star
#

Players.boyngt6355.Backpack.Phone.Script:5: attempt to index nil with 'Character'

#

and this is the line it sends me to

#

local character = player.Character or player.CharacterAdded:Wait()

hexed snow
#

nah u are supposed to use a local script

potent wedgeBOT
#

studio** You are now Level 2! **studio

hexed snow
#

network ownership should replicate animations

#

if the equipped event is working and the animation is getting loaded

#

@quasi star the problem is probably the animation being r6/r15 and the rig you're loading it on being the opposite

#

check that

delicate flint
#

do it on server

#

if you want it to be smoother

#

then you use fireallcleint and play animation there

#

that way it will replicate animation in every client

#

and everyone will see

#

but most likely you will need to use animation event on the server so i jsut do it on the server

#

atleast for abilities

hexed snow
#

if you play directly from client it will always be smoother than from server

#

and if you do it on server you don't need to fire to all clients cuz it's auto replicated ✌️😭

delicate flint
#

who does that 💀

hexed snow
#

that's just bad

delicate flint
#

sure thing bro

#

you just never did a proper system gango

hexed snow
#

even if you need the signal from server then you would still play on client side

delicate flint
#

you cant access the animation in the server mate

#

what

#

are you like

#

1 month experienced?

#

chillax bro

hexed snow
#

holy ragebait

quasi star
delicate flint
#

🥀

#

nvm

#

you'll learn when you get better

#

🆙

hexed snow
#

bros gotta learn better english

oak mango
#

if you still have a problem lmk

quasi star
#

This situation has been a total mess

#

if you'd like I can give you permissions, so you can check it out in studio

oak mango
#

no i know the problem

#

i had it before

#

here's a forum thread that explains it

#
#

i personally just load all anims when the player joins the game and put them all in the list (with a for loop for example)

#

and i index them by name so when i want to play an anim i do something like AnimList[AnimName]:Play()

#

and AnimList[AnimName] = Anim:LoadAnimation()

quasi star
#

also sorry for taking so long to respond, I've been very busy lately

oak mango
#

no just a table

#

you dont need a module

#

AnimTable = {}
function LoadAnimations (animationFolder)
for _,anim in animationFolder:GetChildren() do
AnimTable[anim.Name] = Animator:LoadAnimation(anim)
end
end

#

this is the most simplified version of what i am talking about