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

A button in roblox studio won't work but it used to. is this a glitch? All Help Apprieciated

Asked by 2 years ago

So I have a game I am working on and it was completely fine until today it wouldn't let m save or publish only save to file so I did that then I went back on and the button stopped working, it was a key part in the game. Here is the script:

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
    if player.leaderstats.Cash.Value >= 225 then
        game.ReplicatedStorage.CloneEventStorage:WaitForChild("CloneEvent"):FireServer()
        for _, child in pairs(game.Players.LocalPlayer:WaitForChild("PlayerGui").CloneGui.Frame:GetChildren()) do
            if child:IsA("TextLabel") or ("TextButton") then
                child.Visible = true
            end 
        end
        game.Players.LocalPlayer:WaitForChild("PlayerGui").CloneGui.Frame.CloneBuy.Visible = false
        game.Players.LocalPlayer:WaitForChild("PlayerGui").CloneGui.Frame.Cost.Visible = false
    end
end)

I don't know how to use pictures so if you need a pic tell me how to do it.

All help appreciated:)

Answer this question