I have this code that I put in a local script inside a seat. It's supposed to launch when they click left shift while sitting on it. I can't seem to figure out why it won't work. Thanks in Advance!
local uis = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local ani = script.Parent.Animation
local aT = player.Character.Humanoid:LoadAnimation(ani)
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
aT:Play()
end
end)
uis.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
aT:Play()
end
end)

5 comments
I see... Thanks!
The only problem is it doesn'y work. Could it have something to do with the fact that my character is sitting down. Would making the animation priority - "Action", fix it.
you should only have it if you plan on using it :/
Never Mind, I just made a script in ServerScriptService and told it to change the sit animationId to the biking animationId
Yes, the animation's priority will determine if it is playable depending on the other animations being used