So I've trying to make it so when I key is pressed like F for example some code will run and an animation will play but because I don't know if ROBLOX allows you to put a function in a function I put the animation in a local script and the code in the other and it won't work. Heres the code.
function onKeyDown(key) --Keydown function can't have Animation Function
if key == "f" then
a = game.Lighting.Script.Animation:Clone() --Trying to make Animation Run
end
end)
mouse.KeyDown:connect(onKeyDown)

3 comments
I might be doing this all wrong if so please correct me.
Figured it out :D!
Scratch that still broken :(