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

Part Transparency == 0, +$50 every 10 Help Script Not Working?

Asked by 5 years ago

I'm trying to make it where when Parts transparency == 0 then player gets +$50 every 10. Whats wrong with my script?

    local player = script.Parent.Transparency == 0
        local stats = player:findFirstChild("leaderstats")
        local add = 50
        local cash = stats:findFirstChild("Cash")
        if script.Parent.Transparency == 0 then
                cash.Value = cash.Value + add
                wait(10)
end
0
This script is obviously incomplete... Leamir 3138 — 5y
0
That didn't exactly help me. Darkcraft10 20 — 5y

1 answer

Log in to vote
0
Answered by
zValerian 108
5 years ago
while true do
player = script.Parent
if part.Transparency == 0 then
 local stats = player:findFirstChild("leaderstats")
        local add = 50
        local cash = stats:findFirstChild("Cash")
cash.Value = cash.Value + add'
wait(10)
end
end

I think that should work, just identify where the part and player are.

0
For the love of god, please indent your codes! SirDerpyHerp 262 — 5y
Ad

Answer this question