How do I make a meditation play when m pressed and a weapon animation play?
Asked by
7 years ago Edited 7 years ago
I have two different animations I need played. One is when I swing a sword, I have a special animation. I cant find the url (hoping to use the id in the script) and one that starts when m is pressed which is here.
https://www.roblox.com/library/1476724055/Meditation-Animation
Also just an added bonus where people gain back 10 health every 5 seconds while meditating.
Thanks in advance and hope to upvote your answers.
EDIT: Ok to the request of some of you I will put codes I found that said they would work but didn't. If you fix the script please explain what parts of it do. My code I used for the meditating script is this (I put it in StarterPlayerScripts in a local script)
` Animation = Instance.new("Animation")
01 | Animation.Parent = game.Workspace |
05 | local Player = game.Players.LocalPlayer |
07 | local mouse = game.Players.LocalPlayer:GetMouse() |
09 | mouse.KeyDown:connect( function (key) |
11 | for i, v in pairs (game.Players:GetChildren()) do |
14 | local AnimationTrack = Player.Character.Humanoid:LoadAnimation(Animation) |