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

How can I use an "IntValue" as a Global Variable?

I'm not able to perform arithmetic on an IntValue I placed in ServerStorage. For instance:

local i = game.ServerStorage.i
	i = i + 1 --Error here

What can I use instead? I need to access this variable between two scripts and manipulate it as shown above.

2 comments

0

the only solution i could come up with, is to just use replicated storage instead

0

What do you mean? Like use a remote event to communicate between the two scripts or place the IntValue in replicated storage?

1 answer

✓ Accepted answer

u forgot to put .Value, so do local i = game.ServerStorage.i i.Value = i.Value + 1

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