workspace.Dispenser.Gui.SurfaceGui.Frame.TextButton1.MouseButton1Down:Connect(function() local Cup = workspace.Dispenser.Box2 local Handle = workspace.Dispenser:WaitForChild('Handle') -- "Handle" assumed to already be in Workspace local player = game.Players.LocalPlayer.Character print('LOADED CUP') for i = 1,10 do Handle.Transparency = Handle.Transparency - 0.1 wait(0.1) end workspace.Sound:Play() wait(3) Handle.Transparency = 1 local NewCup = game.ServerStorage.Coffee:Clone() NewCup.Handle.CFrame = Cup.CFrame NewCup.Parent = player.Backpack print (NewCup.Parent) end) -- Rewritten
When I try to run this code via LocalScript, all it prints in the output when I try to clone the item to the player's backpack is, "Backpack is not a valid member of model". I've had this problem in the past and have no idea why it happens. Also the LocalScript is placed inside StarterCharacterScripts, too.