I think your local script crashed/stopped cause character got nil u may try use/replace your while … do line to
repeat wait() until plr and plr.Character and Holding == false
i fixed it
thank you all for your help
here is the fix
it’s the local script
wait(2)
-- // SERVICES // --
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UIS = game:GetService("UserInputService")
-- // VARIABLES // --
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Event = ReplicatedStorage.AbilityEvents:WaitForChild("GuardShield")
local Hum = Character:WaitForChild("Humanoid")
-- // CHECK // --
repeat
wait()
until
Character.Parent == workspace
-- // SCRIPT VARIABLES // --
local Holding = false
local Debounce = false
-- // SCRIPT // --
UIS.InputBegan:Connect(function(Input, gameProcessed)
if not gameProcessed and Debounce == false and Hum.ragdoll.Value == false and not Hum.PlatformStand and Hum.Health > 0 then
if Input.KeyCode == Enum.KeyCode.H and not Holding and not Debounce then
Event:FireServer("Begin", Player)
Debounce = true
Holding = true
while Holding and Character.Humanoid.WalkSpeed == 14 do
wait()
end
print(Holding)
end
end
end)
UIS.InputEnded:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.H and Holding and Debounce then
Holding = false
Event:FireServer("Finish", Player)
wait(5)
Debounce = false
end
end)
-- // EXTRA // --
ReplicatedStorage.ShieldCollisionOff.OnClientEvent:Connect(function()
local shield = Player.Character:WaitForChild("GuardShield")
shield.CanCollide = false
end)
i moved the holding = false part to another place in the script and it worked