MapData.Value = math.random(1,2)
wait(1)
if MapData.Value == 1 then
MapData is an IntegerValue inside the script. & It is defined as:
MapData = script.MapData
**But it does not work. Why!? When the script executes, it does not generate a random number from 1-2.
P.S, I do not want any other method. I want this method to be fixed and I do not want no tables >_> so please...stick to this method and help me fix it.**

2 comments
What happens when you try to run it? Is there any output?
I don't see why it should work. Are there any output errors and what specifically is not happening that should?