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

hi tryna make boosts in my game and i dont know whats happening can u help?[solved]

Asked by 3 years ago
Edited 3 years ago

fixed it

script.Parent.MouseButton1Click:Connect(function()
    local Cost = 150
    local Cd = 300
    local Gui = script.Parent.Parent.Parent.Parent.Parent.Main.Poiton.Visible
    local Poition = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("Poition"):WaitForChild("x2").Value
    local Diamond = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("leaderstats"):WaitForChild("Diamonds")

    if Diamond.Value <= 149 then
        print("no")
    else
        Diamond.Value =Diamond.Value - Cost

        Poition = 2
        print("Bought the poiton")
        wait(Cd)
        Poition = 0


    end

end)

yes i have seen and number of .Parents used is correct

ik its gonna bee something dumb

notice it suucesfully prints it

Answer this question