i was doing this script to make something like an ice effect over the right part of the body but i want to do it with key x pressed 1 time and its not working

local ice = game.ReplicatedStorage.effect.icez
local fire = game.ReplicatedStorage.effect.firezone
local userinput = game:GetService("UserInputService")
game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		
userinput.InputBegan:Connect(function(Input, IsTyping)
	if IsTyping then
		return
	end
if userinput:IsKeyDown(Enum.KeyCode.X) then
		
		local plrTrail = ice:Clone()
		plrTrail.Parent = char.RightLowerArm
		
		local plrTrail1 = ice:Clone()
		plrTrail1.Parent = char.RightUpperArm
		
		local plrTrail2 = ice:Clone()
		plrTrail2.Parent = char.RightLowerLeg
		
		local plrTrail3 = ice:Clone()
		plrTrail3.Parent = char.RightUpperLeg
		
		local plrTrail4 = ice:Clone()
		plrTrail3.Parent = char.RightHand
		
		local plrTrail5 = ice:Clone()
		plrTrail3.Parent = char.Rightfoot
		print("did")
	end
end)
end)
local character = script.Parent.Parent.Parent
end)