#Need Help!! Tryn to get tool anims to play when equipped walking/idle and maybe a specific m1 patter

1 messages · Page 1 of 1 (latest)

crisp creek
#

I would be very grateful for anyone's help

vagrant plover
#

Use Equipped and Uneqipped events

crisp creek
#

I cant get it to work when i do that my default player anims will mix in or just not play the tool anims and only the player anims

#

when i try to fix it they all just are stiff

vagrant plover
#

then override the anims

#

set priorities

#

and the look of the naimation is the animations fault

crisp creek
#

Idk how to do any of that im still new to lua. I already have my anims made i justt want to get them to work butt every script i make wont work

zealous pawnBOT
#

studio** You are now Level 3! **studio

vagrant plover
#

try using the internet

#

search for tutorials

#

DONT ASK AI

crisp creek
#

I have tried that every tutorial does not work

vagrant plover
#

oh and check if anybody had the same issue on roblox dev forum

crisp creek
#

I have cant find anything

#

that is why im here begging for help

vagrant plover
#

then dont beg and ask

#

whats your code

crisp creek
#

so... i cant actually go back and find it i cant ctrl z it.... wtf

#

why cant i ctrl z

vagrant plover
#

idfk

crisp creek
#

fk man

#

idk what to do now

vagrant plover
#

trie d using :LoadAnimation on the animator?

crisp creek
#

eh? i would take scripts fro mtutorials and try to edit them to work some would kinda work but bec i dont code from scratch i dont exactly know what everything does per say

echo bane
#

personally I save the default ids the player comes with and replace it with tool animation ids untill tool is unequiped

#

and swap

vagrant plover
#

that too sure

echo bane
#

works well

vagrant plover
#

honestly idek what the guys asking for anymore

crisp creek
#

okay

#

look

vagrant plover
#

if u want custom anims to play over the default use :LoadAnimation

#

If u want to replace them, do so in the Animation script values locally

crisp creek
#

im so confused

#

most of my coding knowledge is html and python based im not used to lua so i dont know most of anything

vagrant plover
#

then get to know it

#

fr

#

💯

crisp creek
#

THAT IS WHAT IM DOING lol

echo bane
#

yea then start with the basics

crisp creek
#

Is this not basic?

#

im just dumb

echo bane
#

not really

crisp creek
#

it seems basic to me

vagrant plover
echo bane
#

have you ever worked with multiplayer?

crisp creek
#

mostly single

vagrant plover
#
crisp creek
#

Okay actually ik that one

echo bane
#

ye then learn how to control server and client side

crisp creek
#

the script difference

vagrant plover
crisp creek
#

localscript is like it says its specific to the client while a regular script is across the server as a whole

#

that is the jist

echo bane
#

dropped all sources^

crisp creek
#

I will read up on it all thanks

vagrant plover
#

i even put the exact fragment for loadanimation

crisp creek
#

ik you can store player saves in a datacenter with scripts right?

vagrant plover
#

datastores

crisp creek
#

ye

echo bane
#

datastoreservice ye

crisp creek
vagrant plover
#

luau

#

scripter

crisp creek
#

oh well i once made a stat system and had it store the saves i did watch a tutorial but i changed most of it

#

it worked

#

im tryn to use them and when i test it they do nothing

#

no errors they just dont do anything

vagrant plover
#

it could be because ure using the wrong type of script or you put it in the wrong place

crisp creek
#

` local Players = game:GetService("Players")

local function onCharacterAdded(character)
-- Get animator on humanoid
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")

-- Stop all animation tracks
for _, playingTrack in animator:GetPlayingAnimationTracks() do
    playingTrack:Stop(0)
end

local animateScript = character:WaitForChild("Animate")
animateScript.idle.Animation1.AnimationId = "rbxassetid://656117400"
animateScript.idle.Animation2.AnimationId = "rbxassetid://656118341"
animateScript.idle.Animation1.Weight.Value = 5
animateScript.idle.Animation2.Weight.Value = 10

end

local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded) `

#

serverscriptservice regular script

vagrant plover
#

oh my god is this ai

crisp creek
#

no

#

its whatt roblox gave me

#

on the site

#

u gave me

echo bane
#

just replace the starter animation ids with the ones you want sadkerm

crisp creek
#

?

echo bane
#

you know where the idle and walking n running animations are located right?

#

like all the default animations

#

in the player character

crisp creek
#

me using an R6 startercharacter wont make it hardeder to do or complicated right?

echo bane
#

when you run the game click on your character name under workspace in the explorer expand it then expand the animator script, you find it there

echo bane
#

those are the animations you are meant to modify

#

brb for like 10 mins

crisp creek
#

wait

#

the uh

#

animate script roblox spawns u with

#

IS HUGE

vagrant plover
#

you dont modify the script itslf bru

#

u mdoify the alues inside it

#

as in

#

its hildren

#

descendants

crisp creek
#

idk how tho

#

local plr = script.Parent.Parent
local Humanoid = plr:WaitForChild("Humanoid")
the humanoid as an infinite loop for some reason

#

Infinite yield possible on 'Players.Armin_Ack3rm3n:WaitForChild("Humanoid")'

#

okay so

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
echo bane
#

im talkin about this

#

that is the property you need to edit through the script

crisp creek
crisp creek
#

what do i need to do for it to do what u say

zealous pawnBOT
#

studio** You are now Level 4! **studio

echo bane
#

I thought you said you know the basics

crisp creek
#

idk how to refrence the animate localscript and or the children

echo bane
#

anyway

#

add this:

crisp creek
echo bane
#
animation = humanoid.Parent.Animate.idle.Animation1
animation.AnimationId = "your tool animation id"
echo bane
#

if you got the script inside the tool directly then you can add this instead:

#
animation = character.Animate.idle.Animation1
animation.AnimationId = script.Parent.IdleAnimation.Value```
#

supposing that the tool contains "IdleAnimation" as a string value instance

crisp creek
#

it does

#

sorta

#

not that specific name

echo bane
#

k

#

we didnt put the event tho

crisp creek
#

when i do the starterplayerscript localscript it loads the animation once everytime i stop moving

echo bane
#

so youll get the animation even before equiping

#

yes because its the idle animation

crisp creek
#

yeah butt idle should be looped when u are not moving

#

i should add loop if right?

echo bane
#

so is it not looped?

crisp creek
echo bane
#

guess thats cuz there are 2 idle animations

#

just add:

#
animation2 = character.Animate.idle.Animation2
animation2.AnimationId = script.Parent.IdleAnimation.Value
#

we're using the same id so no need to add a second idle animation string value

crisp creek
#

it still doesnt loop

#

I did it right tho but how is this gonna loop it?

echo bane
#

eh its supposed to loop automatically

crisp creek
#

would i not need an if this loop this?

#
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

animation = humanoid.Parent.Animate.idle.Animation1
animation.AnimationId = "rbxassetid://116158184727770"

animation2 = character.Animate.idle.Animation2
animation2.AnimationId = "rbxassetid://116158184727770"```
echo bane
#

yea idk about this

#

it works for me

#

try this one last resort:

animation.Looped = true
animation2.Looped = true
#

add em

crisp creek
#

wont work, where do you have the script placed its in serverscriptservice

#

WAIT I MEAN

#

StarterPlayerScripts

echo bane
#

eh

#

idk it usually loops for me

#

also remove the .Looped part it seems like its not a part of the animation instance @crisp creek

#

have you tried another animation ID ?

crisp creek
#

sry i was with my family for a min

#

I could try a different one

echo bane
#

alr

crisp creek
#

tried it now it doesnt even play it

#

am i just a lost cause... i cant seem to get it to work

#

im sure im wasting your valuable time no?

echo bane
#

nah im chillin

crisp creek
#

okay thanks btw, even if i cant figure it out you are a huge help

echo bane
#

show me the script again

crisp creek
#
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

animation = humanoid.Parent.Animate.idle.Animation1
animation.AnimationId = "rbxassetid://658832408"

animation2 = character.Animate.idle.Animation2
animation2.AnimationId = "rbxassetid://658832408"```
echo bane
#

it seems alright eh

#

try connecting it to an actualy event then

#

create your tool

crisp creek
#

i have my katana tool that i custom made

echo bane
#

and we make it change animation once it is equiped

#

alright then make sure the model is under the tool instance

crisp creek
#

how do i do the onEquipped i forgot the specific function

echo bane
#
local player = game.Players.LocalPlayer

script.Parent.Equiped:Connect(function()
local character = script.Parent.Parent
animation = character.Animate.idle.Animation1
animation.AnimationId = "rbxassetid://658832408"

animation2 = character.Animate.idle.Animation2
animation2.AnimationId = "rbxassetid://658832408"

end)
#

use this

#

in it as a client script

crisp creek
#

local?

echo bane
#

yes local i meant

crisp creek
#

animation is underlined for syntaxx right?

#

do i not have it defined

echo bane
#

in which line?

crisp creek
#

5 and 8

echo bane
#

oh nah cause it is defined as a global variable inside of a function

#

add local to each animation variable

crisp creek
#

oh my bad

echo bane
#

'local animation ....'
'local animation2.....'

crisp creek
#

yeah i thought so but i assumed u had known smthg i didnt

echo bane
#

kk

#

test now

crisp creek
#

i tested doesnt work

#

wtf am i doing wrong

#

should i screenshare i will mute

echo bane
#

brah

#

what do the output say

crisp creek
#

animation is somehow unvalid let me switch it out

echo bane
#

make sure you own the animation

crisp creek
#

not working

#

I do own them

echo bane
#

output?

crisp creek
#

Equiped is not a valid member of tool

echo bane
#

ah...

#

its .Equipped

#

double p

crisp creek
#

LMFAO

zealous pawnBOT
#

studio** You are now Level 5! **studio

echo bane
#

yea I hate scripting on discord

crisp creek
#

okay so now if i move with sword in hand sword hand stays still and after moving it is not right but mixes my anim with default

#

I can inv u to my place if thatt makes it easier for u to help

echo bane
#

um sure

crisp creek
#

user?

echo bane
#

djabdou33

crisp creek
#

oh u must be friend to edit

#

uhh

#

can i temp add u then?

echo bane
#

ok

#

send

crisp creek
#

i did im armin

echo bane
#

friend limit is 1k now anyway

crisp creek
#

crazy

echo bane
#

added

crisp creek
#

okay gave u edit perms

#

how does collab work can i see changes live?

#

btw idk if it gives u access to entire game or justt this placece within the game

echo bane
#

yep its live changes

#

and its only this place

#

i guess?

crisp creek
#

how do i know if ur here?

echo bane
#

you will see me under the "Players" instance

crisp creek
#

okay so ur not in it yet

#

right

echo bane
#

im in now

crisp creek
#

do i need to reopen it?

echo bane
#

no you dont its already a shared server

crisp creek
#

well i dont see tht ur here?

echo bane
#

i dont see you tho

crisp creek
#

ye same

echo bane
#

lets both rejoin then

crisp creek
#

oh thatt is the starter place

#

wrong place

echo bane
#

oh

crisp creek
#

click on places in the files

echo bane
#

alr

crisp creek
#

open asset manager

#

and go to places and then open the one that does not say starter menu or smthg

echo bane
#

whats the name i closed it already

#

same name...

crisp creek
#

Untitled RPG Game no menu

#

the menu is the one with the grass

#

im on the regular one

echo bane
#

alr joining

crisp creek
#

when u open game u start at the menu then get tp to main game

#

u in?

echo bane
#

wait brb

crisp creek
#

ok

echo bane
#

this is stupid it aint opening

#

can i just do it in the first place

#

cuz my studio is stupid aparently

#

nvm it worked now

crisp creek
#

oh i see you

echo bane
#

animation failed to load it seem

crisp creek
#

ah

echo bane
#

you sure you own it?

crisp creek
#

yes i made it

echo bane
#

lemme try a random animation i made

#

put back the first animation id which you wanted to use

#

for me it just says failed to load animation

#

how about you

crisp creek
#

everytime i see this MouseButton1Click is not a valid member of Plugin "cloud_2205048291" - Server
15:36:06.384 Stack Begin - Studio
15:36:06.384 Script 'cloud_2205048291.LocalScript', Line 1 - Studio
15:36:06.384 Stack End - Studio
15:36:06.385 Weld Constraint Plugin by RyCitrus Loaded - Server
15:36:06.636 MouseButton1Click is not a valid member of Plugin "cloud_2205048291" - Client
15:36:06.637 Stack Begin - Studio
15:36:06.637 Script 'cloud_2205048291.LocalScript', Line 1 - Studio
15:36:06.637 Stack End - Studio
15:36:06.638 Weld Constraint Plugin by RyCitrus Loaded - Client
15:36:20.502 Disconnect from ::ffff:127.0.0.1|53757

#

wait actually

#

hold on

#

yeah its thatt everytime

echo bane
#

that must be an error from some plugin you downloaded

crisp creek
#

eah think it is it doesnt matter

echo bane
#

no relation with our script

#

ye

#

so nothing else?

crisp creek
#

naw nothing else in output

#

also why at the spawnpointt is there an xyuz arrow

echo bane
#

idk

crisp creek
#

do you think i did good on my sword

#

its roblox made

#

with parts

echo bane
#

just roblox? no blender?

crisp creek
#

yup all unions

echo bane
#

impressive honestly

crisp creek
#

😄 didnt take me too long

echo bane
#

welp

#

definitly was worth the time

crisp creek
#

the sword?

echo bane
#

yea

crisp creek
#

thanks

#

My game idea is something kinda rouge like obviously it will take time to learn the stuff i need to code but im just really stuck on my animations

echo bane
#

i did struggle with animations too

#

especially that you can only use animations you own

#

cant test with others

crisp creek
#

well i make my animations but i cant get the code to work ever

#

this is so annoying

echo bane
#

ye

#

i dont know now , as i cant test your animation it gives an error

#

and when i use an animation i own it doesnt run cuz im in your game

crisp creek
#

u can use the idle animation i own

echo bane
#

it throws error for me

#

test it yourself and tell me what happens

#

output included

crisp creek
#

Stack Begin - Studio
15:47:15.843 Script 'cloud_2205048291.LocalScript', Line 1 - Studio
15:47:15.843 Stack End - Studio

Stack Begin - Studio
15:47:16.069 Script 'cloud_2205048291.LocalScript', Line 1 - Studio
15:47:16.069 Stack End - Studio

echo bane
#

bro equip the katana

crisp creek
#

oh

#

oops

echo bane
crisp creek
#

it is hard to explain but its still doing that weird thing

echo bane
#

what is it again?

crisp creek
#

with right arm out and if i walk then stop it plays my animation but arm and torso stay still

#

and legs float off ground

#

looks weird

#

and only does it once

echo bane
#

thats when you you walk right?

#

wait actually screen share

#

on dm