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 6 years ago

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

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

1 answer

Log in to vote
0
Answered by
zValerian 108
6 years ago
01while true do
02player = script.Parent
03if part.Transparency == 0 then
04 local stats = player:findFirstChild("leaderstats")
05        local add = 50
06        local cash = stats:findFirstChild("Cash")
07cash.Value = cash.Value + add'
08wait(10)
09end
10end

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 — 6y
Ad

Answer this question