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

I have a problem with shop system?

Asked by 3 years ago

So i made a buy script with remote event here the script:

script.Parent.MouseButton1Click:Connect(function()
    if script.Parent.Parent.Parent.WhichTier == 1
    then
        game.ReplicatedStorage.RemoveClicks:FireServer(4)
        script.Parent.Text = "Equip"
        script.Parent.Equip = true
    end
end)

And heres the remove server script:

game.ReplicatedStorage.RemoveClicks.OnServerEvent:Connect(function(Player,Remove)
    Player.leaderstats.Clicks.Value = Player.leaderstats.Clicks.Value -Remove
end)

BUT WHEN I CLICK THEN NOTHING! (ALSO THERES NO ERROR IN THE OUTPUT)

(ALSO THIS IS A LOCAL SCRIPT)

0
Is "script.Parent.Parent.Parent.WhichTier" 1? Because if it's not, the if statement will not run, thus it won't fire the event. User#32819 0 — 3y
0
Yeah its is JasiuJasiuB 13 — 3y
0
Why are you sending an argument called 4? Dovydas1118 1495 — 3y
0
cause its the cost JasiuJasiuB 13 — 3y

Answer this question