Hello i am making a undo button for my game, where u can undo parts that you create, this all happens on the client, i already got a previous part but i want to get the previous part to the previous one
Code:
PartButton.MouseButton1Click:Connect(function() local Part = game.ReplicatedStorage.NewPart:Clone() Part.Parent = workspace.Parts -- Set the previous part PreviousPart = Part end) Undo.MouseButton1Click:Connect(function() if PreviousPart ~= nil then PreviousPart:Destroy() PreviousPart = nil end end)