Annyeong!Hello!
So I have a shop gui,then there is a buy button,what i want it to do is that i want the player to buy a tool,then the player will not be able to buy it again.It will cost the in game currency,so i do not want it to be in a games form.However it doesn't work.I don't know what is wrong but i tried :FindFirstChild and still did not work
There was also NO output error
Local Script:
local plr = game.Players.LocalPlayer
local Cloud = game.ReplicatedStorage["Flying Cloud"]
local button = script.Parent
button.MouseButton1Click:Connect(function()
if plr.leaderstats.Scikoins.Value == 100 or plr.leaderstats.Scikoins.Value >= 100 then
plr.leaderstats.Scikoins.Value = plr.leaderstats.Scikoins.Value - 100
Cloud:Clone().Parent = plr.Backpack
wait(2)
warn(plr.Name.."has bought a cloud")
else
warn(plr.Name.."has not enough scikoins")
if plr.Backpack:FindFirstChild("Flying Cloud") then
warn(plr.Name.."already has a cloud")
end
end
end)

3 comments
Maybe make it so it runs the same thing when the player has no scikoins?
hm ok...
@exarlus i don't get it tho