local Player = game.Players.LocalPlayer local UName = Player.Character.Name for i,v in pairs(workspace:GetChildren())do if v:IsA("Part") and v.Name == "Tape" then game.workspace.UName.HumanoidRootPart.CFrame = v.CFrame end end
I have error UName is not a valid member of workspace
What roblox think you are doing is finding an instance wiith the NAME UName to fix this just do
game.Workspace[UName].HumanoidRootPart.CFrame = v.CFrame
or just use the character Player.Character