i have a localscript in startergui, the script is as follows;
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Animation = Player.Character:WaitForChild("Humanoid"):LoadAnimation(script.Animation)
Mouse.KeyDown:Connect(function(Key)
if Key == "h" then
Animation:Play()
end
end)
Mouse.KeyUp:Connect(function(Key)
if Key == "h" then
Animation:Stop()
end
end)
for some reason it works in studio and not the game…