--\LOCAL SCRIPT
--{(Local Script "Guarding"}}-- --{Input Started UserInputService.InputBegan:connect(function(input, gameProcessed) if input.KeyCode ~= Enum.KeyCode.E then return end; if gameProcessed then else if CombatEnabled or EvadingEnabled == true then return end; if GuardingEnabled == false then GuardingEnabled = true GuardingValue.Value = true print("Guard") --{RemoteEvent ReplicatedStorage.RemoteEvents.CombatEvents.GuardHoldEvent:FireServer() while GuardingEnabled == true and wait() do print(GuardingValue.Value) if GuardingEnabled == false then GuardingEnabled = false GuardingValue.Value = false break end end end end end) --{Input Ended UserInputService.InputEnded:connect(function(input, gameProcessed) if input.KeyCode ~= Enum.KeyCode.E then return end; if gameProcessed then else if GuardingEnabled == true then GuardingEnabled = false GuardingValue.Value = false end end end)
--\SCRIPT
--{{Script "Guarding"}}-- --{Hold ReplicatedStorage.RemoteEvents.CombatEvents.GuardHoldEvent.OnServerEvent:connect(function(Player) --{Animation local Animation = Player.Character.Humanoid:LoadAnimation(ReplicatedStorage.Animations.Combat.Guard) local current = Animation if GuardingValue.Value == true then current:Play() Player.Character.HumanoidRootPart.IsBlocking.Value = true repeat wait() until GuardingValue.Value == false if GuardingValue.Value == false then current:Stop() Player.Character.HumanoidRootPart.IsBlocking.Value = false end end end)
ReplicatedStorage was identified, but while in studio it works perfectly but when it comes to actual in-game everything prints but the animation does not work like it should in studio, any help?