local Player = game.Players.LocalPlayer Mouse = Player:GetMouse() Mouse.KeyDown:connect(function(Key) if(Key:lower() == "shift") + ("e") then anim = Player.Character.Humanoid:LoadAnimation(script.animTest) anim:Play() end end)
I am making a slide script but it wont let me take "shift" + "e" just one word
Change:
"shift") + ("e")
to:
"shift") and ("e")
Might need to alter formatting there with the brackets, but something like that would be better, and as well for animation use an event and fire the animation on event
You would have to combine this with UserInputService:IsKeyDown()
local UIS = game:GetService("UserInputService") local Player = game:GetService("Players").LocalPlayer Mouse = Player:GetMouse() local function isShiftDown() return UIS:IsKeyDown(Enum.KeyCode.LeftShift) or UIS:IsKeyDown(Enum.KeyCode.RightShift) end Mouse.KeyDown:connect(function(Key) if Key == "e" and isShiftDown() then anim = Player.Character.Humanoid:LoadAnimation(script.animTest) anim:Play() end end)