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

Any Ideas Why These Aren't Working?

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.

7 comments

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?

0

Nevermind the second part, I didnt read the whole thing...

0

Alright, here is the Heiarchy. http://gyazo.com/2f33372121ba844cce55db528b89423b I'll include it in the question as well.

0

Put the whole thing in ServerStorage.

0

The heiarchy?

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?

0

It's basically a form of getting money in game. It's for 1 player in a single player server.

1 answer

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

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