when i run the code it works once before it says Piece is not a valid member of ReplicatedStorage "ReplicatedStorage"
heres the code
local Players = game:GetService("Players")
local cantele = true
UserInputService.InputBegan:Connect(function(Key)
if not cantele then return end
if Key.KeyCode == Enum.KeyCode.E then
cantele = false
local t = Players.LocalPlayer.Character.HumanoidRootPart
local weld = Instance.new("Weld", game.Players.LocalPlayer.Character.HumanoidRootPart)
local b = game:GetService("ReplicatedStorage").Piece
local previousParent = b.Parent
b.Parent = workspace
wait(0.1)
b.Parent = previousParent
b.Parent = workspace
b.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
weld.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
weld.Part1 = b
if Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
t.CFrame= t.CFrame + (t.CFrame.LookVector * Vector3.new(20,20,20))
end
cantele = true
end
end)