#Clicking the button

1 messages · Page 1 of 1 (latest)

thorn pike
#

The pointer cursor doesn’t appear when I hover over the button.

local tycoon = script.Parent.Parent.Parent

local gemTemplate = game.ReplicatedStorage:FindFirstChild("Gem").Cube

local dropperPartsFolder = tycoon:FindFirstChild("DropperParts")

local dropColorValue = tycoon:FindFirstChild("Values").DropColorValue

local materialValue = tycoon:FindFirstChild("Values").MaterialValue

local billboardGuiGem = game.ReplicatedStorage:FindFirstChild("BillboardGuiGem")

local moneyValue = tycoon:FindFirstChild("Values").MoneyValue

local debounce = false

script.Parent.Click.ClickDetector.MouseClick:Connect(function(player)
    if player == tycoon.Values.OwnerValue.Value  then
            if debounce == false then
                debounce = true
                local cloneGui = billboardGuiGem:Clone()
                local part = gemTemplate:Clone()
                part.Size = Vector3.new(1.15, 1.539, 0.382)
                part.BrickColor = dropColorValue.Value
                part.Material = materialValue.Value
                part.Name = "Gem"
                part.Parent = dropperPartsFolder
                part.CFrame = script.Parent.Spawner.CFrame

                local cashValue = Instance.new("IntValue", part)
                cashValue.Value = 5
                cashValue.Name = "CashValue"

                cloneGui.Parent = part
                cloneGui.Frame.TextLabel.Text = "$"..cashValue.Value
                wait(0.5)
                debounce = false

                game.Debris:AddItem(part,15)
            end
    end
    
    
end)
stuck sluice