Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can anyone help me with this job script for some reason it shows a error on leaderstats?

the job script is not working for some reason someone help pls

local player = game.Players:GetPlayers()

local Jobbing = false

function onClicked(playerWhoClicked)if Jobbing == false then Jobbing = true playerWhoClicked.Character.LowerTorso.Anchored = true playerWhoClicked.Character.Head.Title.F.Working.Visible = true wait(5) playerWhoClicked.Character.LowerTorso.Anchored = false playerWhoClicked.readerstats.Wallet.Value=playerWhoClicked.readerstats.Wallet.Value+95; playerWhoClicked.Character.Head.Title.F.Working.Visible = true playerWhoClicked.Character.Head.Title.F.HowMuch.Visible = true wait(1) playerWhoClicked.Character.Head.Title.F.HowMuch.Visible = false Jobbing = false end end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

2 comments

0

Put the code between the codeblock (lua button) and also :connect is deprecated use :Connect instead

0

Also what error does it show and which line errors

1 answer

script.Parent.ClickDetector.MouseClick:connect(onClicked)``` :connect is maybe wrong, change it to :Connect. And what error do you have in the output? If you don't have any error in the output try adding print() after every function to see which works and which don't works. If you have an error in the output try to fix it and it will work.

This discussion is preserved as it was. New answers, comments, and votes are closed.