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

The script says that local Button = UI:WaitForChild(OofButton,10) Is wrong. Can you help?

Asked by
xf8d 5
5 years ago

local Player = game.Players.LocalPlayer

local Stats = Player:WaitForChild("leaderstats")

local OoferBucks = Stats:WaitForChild("OoferBucks")

local UI = script.Parent -- UI is the ScreenGui

local Button = UI:WaitForChild(OofButton,10)

local Debounce = false -- this prevent from spamming the button!

Button.MouseButton1Click:Connect(function()

if Debounce == false then

Debounce = true

OoferBucks.Value = OoferBucks.Value + 1

wait(2) -- this is the amount of secounds you should wait before getting more money!

Debounce = false

end

end)

I've been trying to get this script to work for over an hour and it just isn't working. It says that local Button = UI:WaitForChild(OofButton,10) is incorrect and I've been trying to fix it but it isn't working. Please help.

0
You forgot to include the String-cap syntax. Ziffixture 6913 — 5y
0
Is it a Text Button You Are Using Or Text Lebel ?? EffilnuC 7 — 5y

Answer this question