My character always freezes when i run the "else" function
local UserInputService = game:GetService("UserInputService") local shiftKeyL = Enum.KeyCode.LeftShift local shiftKeyR = Enum.KeyCode.RightShift local function IsShiftKeyDown() return UserInputService:IsKeyDown(shiftKeyL) or UserInputService:IsKeyDown(shiftKeyR) end local function Input(input, gameProcessedEvent) if IsShiftKeyDown() then print("NA") else while wait(0.1) do local plr = game.Players.LocalPlayer local character = plr.Character local LeftArm = character["Left Arm"]:Clone() local RightArm = character["Right Arm"]:Clone() local LeftLeg = character["Left Leg"]:Clone() local RightLeg = character["Right Leg"]:Clone() local Torso = character.Torso:Clone() local Head = character.Head:Clone() LeftArm.Material = ("ForceField") RightArm.Material = ("ForceField") LeftLeg.Material = ("ForceField") RightArm.Material = ("ForceField") Torso.Material = ("ForceField") Head.Material = ("ForceField") LeftArm.Parent = game.Workspace RightArm.Parent = game.Workspace LeftLeg.Parent = game.Workspace RightLeg.Parent = game.Workspace Head.Parent = game.Workspace Torso.Parent = game.Workspace LeftArm.Position = character["Left Arm"].Position RightArm.Position = character["Right Arm"].Position LeftLeg.Position = character["Left Leg"].Position RightLeg.Position = character["Right Leg"].Position Head.Position = character.Head.Position Torso.Position = character.Torso.Position LeftArm.Orientation = character["Left Arm"].Orientation RightArm.Orientation = character["Right Arm"].Orientation LeftLeg.Orientation = character["Left Leg"].Orientation RightLeg.Orientation = character["Right Leg"].Orientation Head.Orientation = character.Head.Orientation Torso.Orientation = character.Torso.Orientation LeftArm.CanCollide = false RightArm.CanCollide = false LeftLeg.CanCollide = false RightLeg.CanCollide = false Head.CanCollide = false Torso.CanCollide = false LeftArm.Anchored = true RightArm.Anchored = true LeftLeg.Anchored = true RightLeg.Anchored = true Torso.Anchored = true Head.Anchored = true character["Left Arm"].Anchored = false character["Right Arm"].Anchored = false character["Left Leg"].Anchored = false character["Right Leg"].Anchored = false character.Torso.Anchored = false character.Head.Anchored = false end end end UserInputService.InputBegan:Connect(Input)