of     1   

Mintacle
#141045364Monday, July 21, 2014 10:41 AM GMT

I've tried to make a table that gives players a string value, but its supposed to be random, for some reason it isn't random as when I rejoin a new server I get the same string and every time I re-spawn I always end up with the same pattern of string values. Can someone help e with this?? My script goes: MagicTypes = {"GreatTreeArc", "ArcOfTime", "WoodMake"} i = math.random (1, #MagicTypes) Player.MagicType.Value = MagicTypes[i]
Mintacle
#141047285Monday, July 21, 2014 11:27 AM GMT

bumppp
Bebee2
#141047356Monday, July 21, 2014 11:29 AM GMT

My best suggestion is to do math.randomseed(tick()) at the top of the script. You have been warned, if you start with the same number, you may end up with the same sequence.
Mintacle
#141047747Monday, July 21, 2014 11:39 AM GMT

How do i end up with a new sequence?? So how do I change the number??
Bebee2
#141047783Monday, July 21, 2014 11:39 AM GMT

Perhaps do math.randomseed(tick()) every time you use math.random Just a thought. I cannot test that atm.
Mintacle
#141047948Monday, July 21, 2014 11:44 AM GMT

The script works randomly I think so thank you, but because it random I can't be sure. So the best way is to just add: math.randomseed(tick()) whenver I use math.random?
Bebee2
#141048015Monday, July 21, 2014 11:45 AM GMT

I'm not sure about the exact way math.random get it's "randomized" variable. It may appear more "random" though.
Mintacle
#141048429Monday, July 21, 2014 11:56 AM GMT

Well thanks for your help really appreciate it! :D

    of     1