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

I cant make proximiity prompt clickable when bread maker stand is buyed?

Asked by 2 years ago

I tried to make bread stand and when u buy it u can make bread but anyway i can press it when its not visible how to fix it?

local bread1 = workspace["Bread!"].Part1
local bread2 = workspace["Bread!"].Part2
local bread3 = workspace["Bread!"].Part3
local bread4 = workspace["Bread!"].Part4

script.Parent.MouseButton1Down:Connect(function(hit)
    local player = game.Players.LocalPlayer
    if player.leaderstats.Cash.value >= 1000 then
        player.leaderstats.Cash.Value -= 1000
        script.Parent.Visible = false

        bread1.Transparency = 0
        bread2.Transparency = 0
        bread3.Transparency = 0
        bread4.Transparency = 0
        bread2.SurfaceGui.TextLabel.Visible = true
        bread3.SurfaceGui.TextLabel.Visible = true
        bread3.ProximityPrompt.Enabled = true
        while wait() do
            bread3.ProximityPrompt(function()               
                print("hello")

I made proximity prompt not enabled on start.

Answer this question