So like for eg: I want to break some one's neck, so when i'm near him i can do that, but if i'm not a person. i want to collect stuff, and i use my animation for collecting stuff, but how do you do two different animations by press two same keys?
There are a few ways you can do this.
First you can use the ROBLOX Animation method. It is a bit unclean but it works.
Second you can use CFrame, this is probably most efficient.(Vector3 does not allow bricks to pass through each other)
Third you can use Motor6d, it is pretty buggy because of the new ROBLOX animations but it still works.
In regards to the key pressing this is how you do it.
--local script in StarterGui or StarterPack local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() -- I know its odd using a Mouse when key pressing but this is lua is.... function onKey(key) key = key:lower() --makes it so you can press the key even when in caps lock if key == "f" then --Your animation code here end Mouse.KeyDown:connect(onKey)