it prints the text i have below the :Play() so it should be running, right? or at least its not getting caught up on that when the script runs
this is done within a module script located in repstorage, :Init() is being called from a localscript in startercharscripts
(this is also not the full script, but the stuff above it is completely irrelevant its just services and a couple constant variables so that shouldnt cause it)
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
--local rootPart = char:WaitForChild("HumanoidRootPart")
local animator = hum:WaitForChild("Animator")
--Anim
local runAnim = animator:LoadAnimation(Resources.Animations.Run)
local function runSpeed(b:boolean)
if b then
hum.WalkSpeed = maxSpeed
runAnim:Play()
print("anim should be running")
else
hum.WalkSpeed = minSpeed
runAnim:Stop()
print("anim should not be running")
end
end
function MovementLib:Init()
local running = false
--runAnim:Play()
UIS.InputBegan:Connect(function(i,gps)
if gps then return end
print("input received ", i.KeyCode)
if i.KeyCode==Enum.KeyCode.LeftShift then
running = not running
runSpeed(running)
end
end)
end
return MovementLib