Some simple bug, need help on scripts!

Hi developers!

I recently updated my shop gui with gears, now my gears aren’t buyable anymore!

Can someone find the error and fix it?
If you’re a good scripter this is a joke for you!

DM me on devforum or on Discord (Cosmo#7183)

Thanks!

4 Likes

I have sent a friend request. jamston#1608

2 Likes

Grammar . “don’t make angry your granny”

2 Likes

Sorry dude, this description was writed in 5 seconds

2 Likes

First of all, we can’t help you without you sending the script.

3 Likes

You have to see the situation before the script, a disaster!

3 Likes
local player = game.Players.LocalPlayer

local currency = player.leaderstats.CurrencyName
local button = script.Parent
local cashneeded = -- insert cash needed here
local function buy()
if currency.Value <= cashneeded then
currency.Value - cashneeded

local c = game.ReplicatedStorage.Item:Clone()
local c1 = game.ReplicatedStorage.Item:Clone() -- Clone the same item(only add this if you want the item to stay when the player resets)


c.Parent = player.Backpack
c1.Parent = player.StarterGear
end
end

Button.MouseButton1Click:Connect(function()
buy()
end)

This script might not work since I haven’t scripted in a while and scripted this at night.

Also, this doesn’t have data store.

3 Likes

I took a look at everything. There’s a lot more to it than just this.

2 Likes

Could you send the script here? If there is a “situation” link a video or explain it. I don’t think a lot of people want to add you on discord it’s not going to get you help.

3 Likes

We need the script in-order to fix the bug, no one can fix a bug without a script.

2 Likes