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

how to make the rebirth button on my ui work?

Asked by 3 years ago
Edited 3 years ago

this regular script inside the text button in a frame in a screen gui has no errors, but it will not actually do the rebirth, help?

local Part = script.Parent
    Part.MouseButton1Click:Connect(function()
        local player = game.Players.LocalPlayer
        if player then
            local leaderstats = player:WaitForChild("leaderstats")
            local Currency = leaderstats.Rebirths
            local Selling = leaderstats.Coins
            if Selling.Value > 1500 then
                Currency.Value = Currency.Value + Selling.Value + 1
                Selling.Value = 0
                script.Parent.clink:Play()
            end
        end
    end)


Answer this question