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

Trying to play an Animation on "f" and when the animation ends it soom's back ?

Asked by 8 years ago
Edited 8 years ago

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

function KeyD(key) key = key:lower() hotkey = script.Hotkey local char = player.Character

if key == hotkey.Value then 
    local dance = Instance.new("Animation")
    dance.AnimationId = "http://www.roblox.com/asset/?id=471166537"
    local animloader =char.Humanoid:LoadAnimation(dance)
    animloader:Play()
end

end

mouse.KeyDown:connect(KeyD)

---- (Not included in the Code) Want it to stay where it ends. Comment for what I want

0
Can you be more descriptive of your issue please? GreekGodOfMLG 244 — 8y
0
You need to describe the problem better. I don't have an answer for you at this time. I do have a suggestion. Instead of using KeyDown why don't you use UserInputService? It's not hard and you'll certainly be glad you learned it. I will gladly provide an example if you want. AZDev 590 — 8y
0
Ok so what my question was that why does the animation goes back to the place where it started when it ends ?!? It's like it sooms back to the place I started. GalaxyPegasusGinka 0 — 8y
0
Ok how about you guys go and play my game the animations will be there just look for the keys in the desc "https://www.roblox.com/games/448233878/RBLX-Testing-Place" Here Read the desc for the animtions. GalaxyPegasusGinka 0 — 8y

Answer this question