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

Any Ideas Why These Aren't Working?

Asked by 9 years ago

Adding on to my previous question, answered by parkderp1, I have yet another problem concerning scripts and Lighting.

Before, I display my scripts, this is the Hierarchy: gyazo.com/2f33372121ba844cce55db528b89423b

This is the code inside the script "cash."

lighting = script.Parent.Parent.Parent

while true do
    wait(2.5)
    lighting.Money.Value = lighting.Parent.Money.Value + script.Parent.Value print "earn"
    wait(2.5)
end

This adds the value of "Earnings" to the value of "Money."

This is the code inside the script "Script."

lighting = script.Parent.Parent.Parent

while true do
    wait(30)
    lighting.Money.Value = lighting.Money.Value - script.Parent.Value print "fee"
    wait(30)
end

This subtracts the value of "Fees" from the value of "Money."

Both of these scripts are enabled when the game is "started" by a TextButton. But the thing is, they do not run in Lighting for some reason, and the prints do not show up in the output. If anyone could help with this I'd very, very much appreciate it.

0
First off there's a designated place to store things. In fact there are two, ReplicatedStorage and ServerStorage. Also, could you take a picture of the hierarchy with gyazo or something like that? parkderp1 105 — 9y
0
Nevermind the second part, I didnt read the whole thing... parkderp1 105 — 9y
0
Alright, here is the Heiarchy. http://gyazo.com/2f33372121ba844cce55db528b89423b I'll include it in the question as well. sidekick83 80 — 9y
0
Put the whole thing in ServerStorage. parkderp1 105 — 9y
View all comments (3 more)
0
The heiarchy? sidekick83 80 — 9y
0
What's the purpose of this? Is this for the total amount of money in the server? Or is this for each individual player? Redbullusa 1580 — 9y
0
It's basically a form of getting money in game. It's for 1 player in a single player server. sidekick83 80 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

I got it to work, nevermind guys! Thanks for your help anyway.

Ad

Answer this question