#my animation dont play
1 messages · Page 1 of 1 (latest)
any errors in the output?
can us show the script because its defo the code lol
so you want it to when the player presses E, the rig will play an animaiton for everyone to see? playing animations on the server side will play the animation for everyone, i just want to make sure thats what you want
or did you want the animation to only play for the local player, rather than the entire server?
Yes i was trying to make when i press E the rig play the animation to everyone to see
** You are now Level 1! **
i was trying to do when i press E my character run the animation but it was not working so i tried to make the rig run the animation
so you want the player to run when E is pressed?
yes
okok
so is e to run? odd system haha
or are you trying to do custom animations w/ a running animation as well?
a
its not a running animation
i tried to make when i press E it plays the animation
oh i thought you said a running animation lol
so, since animations played on a character is seen by all players, you can actually use a local script inside starter player and others will still see the animation
put a local script inside of StarterPlayer > StarterCharacterScripts, inside that script you can add a "Animation" object and paste your ID inside
local animator = script.Parent:FindFirstChildWhichIsA("Humanoid"):FindFirstChildWhichIsA("Animator") --the animator which is inside the rigs' humanoid object
local animation = script:WaitForChild("Animation") -- animation object inside the script
local keycode = Enum.KeyCode.E -- E
local ius = game:GetService("UserInputService")
local playAnimation = animator:LoadAnimation(animation) -- load the animation, and you can call "playAnimation:Play()" to play it
playAnimation.Looped = false
-- i suggest adding a debouce to avoid playing the animation over and over, this is basically a cooldown
local debounce = false
-- e to play animation
ius.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == keycode and debounce == false then
debounce = true
playAnimation:Play()
playAnimation.Ended:Wait() -- wait for the animation to end
debounce = false -- allow E to be pressed and the animation to play again
end
end)
yipee
tysmm
np :D
yo how can i make my hits do dmg
you would need to make a hitbox but it would preferable if you made a new post on this