I have this:
MapData.Value = math.random(1,2)
wait(1)
if MapData.Value == 1 then
& this
MapData = script.MapData
The MapData is an Integer Value that is a sub or like merged inside the script if you get my drift and why is it not assigning a random value? It is breaking. What is going on?

3 comments
There!
Done it your way :)
We don't have enough context to know why it's breaking. Provide more of your script. This fragment isn't enough.