#whenever i use random, like in any script, it never works or will break my code entirely, any fix?
17 messages · Page 1 of 1 (latest)
** You are now Level 2! **
is math.random isnt really compatible with other assets other than a digt
like (1,50)
unless its probably given variables to communicate or smth
i had this problem too once when i tried doing something similar
especially since you're trying to find TeleportPart with math.random
can you show the whole script?
i can assure you it is not the script
it is the way i use to make stuff random
the game.workspace.pumpkinstuff, exists aswell
everytime i use this method of "random" it breaks entirely
i dont think the error is coming from these lines though
Ah wait
local Array = workspace.PumpkinStuff.Spawns:GetChildren()
local TeleportPart =Array[math.random(1, #Array)]
you werent indexing the actual table
You were just getting a random number from the amount of things inside the spawns