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

Assigning random values from 1-2, not working? Why?

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

0

There!

0

Done it your way :)

0

We don't have enough context to know why it's breaking. Provide more of your script. This fragment isn't enough.

1 answer

intergers aren't supposed to work with math.random, u can however try using tostring() or something, I'm confused a lil though... :/

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