So I am making a game and I want when the players buy a skin it goes into there locker and when they choose it it gets put on them instead of the original skin that they were wearing

Here's the script I need the part that when the player buys the skin and it goes into the locker and the part where they choose it and it goes on them:

script.Parent.MouseButton1Click:connect(function()
 local RS = game:GetService("ReplicatedStorage")
 local item =  RS:WaitForChild("Raven")
 local price = 2000 -- Change Your Price Here
 local player = game.Players.LocalPlayer
 local stats = player:WaitForChild("leaderstats")
 
 if stats.Cash.Value == price then -- Change the Money to your Currency Name
  stats.Money.Value = stats.Money.Value - price
  local cloned = item:Clone()
  local cloned2 = item:Clone()
---Here's the part where it gets put in the locker gui

 end
end)

2 comments

0

once cloned, set it's parent and position

0

Ok but how do I make that script