Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

?Hello, new scripter that needs some help on animating and KeyDown,ect

I watched numbers of videos and read most of the Wiki for scripting. However, could anyone give me any clues on how to make an animation active using Keys like "shift",q, ect ???

1 answer

✓ Accepted answer

The KeyDown event is actually kind of simple to use.

--LocalScript

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

mouse.KeyDown:connect(function(key)
if key == "q" then --if you want the key to be shift, it would be "if key:byte() == 48 then
--do stuff here
end
end)

2 comments

0

Thanks mate but how to make a Character do a maded animation when the key is pressed?

0

Use ROBLOX's Animation plugin to make one. Here's the wiki page for animations.

This discussion is preserved as it was. New answers, comments, and votes are closed.