Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a meditation play when m pressed and a weapon animation play?

Asked by 6 years ago
Edited 6 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")

Animation.Parent = game.Workspace

Animation.AnimationId = "http://www.roblox.com/asset/?id=1476724055" 

local Player = game.Players.LocalPlayer

local mouse = game.Players.LocalPlayer:GetMouse()

mouse.KeyDown:connect(function (key)

for i, v in pairs(game.Players:GetChildren()) do

if key == "m" then
    local AnimationTrack = Player.Character.Humanoid:LoadAnimation(Animation)

        AnimationTrack:Play()

end

end

end)`
0
This isn't a request site. It would help to have some code to start with, because it helps you learn, and helps us solve your problem. obcdino 113 — 6y
0
UserInputService Timmerman73 85 — 6y
0
There I added my script i tried ChestplateCannon 0 — 6y

Answer this question