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

Can someone fix this script?

local ting = false --debouncer

function onClicked(player)

    if not ting then --debounce check
    ting = true--activate debounce

    local stats = player:findFirstChild("leaderstats") 

    if stats then --If moneyholder exists then
        local cash = stats:findFirstChild("PartsClicked")
        cash.Value  = cash.Value + 1
    end

    ting = false --remove debounce
    end

end

script.Parent.MouseClick:connect(onClicked)

its supposed to give you cash but it no work

1 comment

0

Why did this get -1 reputation?!

1 answer

Put a ClickDetector in the part and do: script.Parent.ClickDetector.MouseClick:connect(onClicked)

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