Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Tools purchased from the in game store not appearing in the Game ?

Asked by 6 years ago

Just as the title says, can I have any assistance with this?

The tools are called from the replicated storage and when I purchase them in the real game, the items are invisible, but I actually hold them.

How do I fix that?

local player=game.Players.LocalPlayer
local leaderboard=player:WaitForChild("leaderstats")
local button=script.Parent
local price=button:WaitForChild("Price")
local item=button:WaitForChild("ItemName")
local rs=game:GetService("ReplicatedStorage")

button.MouseButton1Click:connect(function()
 if leaderboard.Coins.Value>=price.Value then
  leaderboard.Coins.Value=leaderboard.Coins.Value-price.Value
  local item=rs:WaitForChild(item.Value)
  item:Clone().Parent=player.StarterGear
     item:Clone().Parent=player.Backpack

 end
end)

while wait()do
 button.Text=item.Value.."-"..price.Value
end

Answer this question