I have a punch animation and the script for it but whenever I play the game and left click it just displays the punch and server text in the output menu it doesn’t actually play the animation. Yes I’m on R6 and yes I copied the animation id. I have screenshots and videos of what happens.
#Scripting or animation not working when I play test
1 messages · Page 1 of 1 (latest)
check ur animation priority
How do I do that by chance?
Oh yes I already did this I have to set to action but it still doesn’t work?
I have to set to action but it still doesn’t work
uhh maybe try loading from the animator instead of humanoid
Wdym like change the script from waitforchild(“humanoid”) to (“Animator”)?
Cuz that didn’t work
i think its under humanoid
What does that mean
its parented to humanoid i think
theres an Animator object inside of humanoid
u can check by playing the game cuz i forgot
How do I check that
What do I look for when I play the game
Character:WaitForChild("Humanoid").Animator
you load animations from that instead of the humanoid
That didn’t change anything either 😭
** You are now Level 2! **
still cant find animation priority?
No It was set to action the whole time
Still doesn’t work tho
Yes it was always set to action
are you sure you're loading the animation from the Animator then playing it
also try doing
are you using animation id?
M1.Priority = Enum.AnimationPriority.Action
Yes
I already did that too
and you got the new id for the new uploaded one?
Yes
not the first one
Okay I did that it still didn’t work 😪
Still just says punch and server in the output
weird
That is your animation?
are you sure it's r6
Or from a friend?
like your avatar is r6
Send script
I’ll have to download discord on pc gimme a sec
local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local M1 = humanoid:LoadAnimation(script.Animations.M1)
UIS.InputEnded:Connect(function(I, E)
if E then return end
if I.UserInputType == Enum.UserInputType.MouseButton1 then
print("punch")
game.ReplicatedStorage.MainEvent:FireServer()|
M1:Play()
end
end)
thx
also sorry for my laziness lmao
Did it work 👀
uh it got errors
** You are now Level 2! **
i screenshotted it and just copied it so mgiht have to fix the syntax
** You are now Level 1! **
Try InputBegan and use animator
they did try using animator
I’ll give you anim its basic as hell
Put animation :Play() before FireServer() @indigo lake
If you use it tho don’t forgot to credit me
😭
im not gonna use it, im on template im gonna delete it
Id: 127256419663298
That didn’t fix it sorry
You are using rbxassetid://?
Yes
script works so it's an animation problem
I talked to an animation guy and he said it was a script problem 😭
That’s why I’m here in the first place 😭
Strange, is working on my studio. Try my script:
local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local M1 = animator:LoadAnimation(script.Animations.M1)
M1.Priority = Enum.AnimationPriority.Action
UIS.InputBegan:Connect(function(I, E)
if E then return end
if I.UserInputType == Enum.UserInputType.MouseButton1 then
print("punch")
M1:Play()
game.ReplicatedStorage.MainEvent:FireServer()
end
end)
Yeah, most probably
i got no permission
i think its working
try this script
local uis = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://127256419663298"
uis.InputEnded:Connect(function(I, E)
if E then
return
end
if I.UserInputType == Enum.UserInputType.MouseButton1 then
local loader = hum:LoadAnimation(anim)
loader:Play()
end
end)
make new local script
disable that one
okay im on my pc now so i can copy paste scripts
** You are now Level 3! **
this one didnt work it printed punch and server and thats all
the script i sent should work
i test another animation and worked
if there any problem then its on your animation
try making another animation and see if that works
it said failed to load animation this time
i think the id is wrong
how you copy it?
when i published new id, the id is shorter than yours
you prob copying the wrong one
ill give u the steps of how to get the id
i went to the website and clicked copy id
i did that and it didnt change anything
rbxassetid://110340755003388
this is the new id
welp i got no idea
i dont think its an animation issue because when i put the correct id to your script nothing popped up in the output window it was just blank
** You are now Level 1! **
im like 80% sure thats the problem
okay but it says save and restart i dont wann restart lol
i already put like four hours into this lol
** You are now Level 4! **
no
** You are now Level 21! **
it wont
haha 21
it worked youre a genius
yeah i had the same problem a while back