Constant error about math.random

ok i see an error ’ ServerScriptService.desiredTrees:6: attempt to index nil with ‘Clone’ ’

Then you defined the “TreeModel” incorrectly. Where did you put the tree model?

i have multiple objects, one in replicated storage, server storage and workspace and for some reason in serverscriptservice

So which object do you want to clone. Whatever object you want to clone you must define the path to.

any that’ll work, now i dont know which one to put

You can put any model that you want. Trees, whatever. Just define it on this line:

local TreeModel = --define here

here’s an example:

local TreeModel = game.ServerStorage.PineTree

i did define, ill put one and delete other and ill tell you

1 Like

oh no, they all spawn in onne place

That should not be happening. Any other errors? Also I gtg I’m sorry. I can help you later. You can repost this code in another topic. Goodluck :slight_smile: .

1 Like

nope, also didnt happen again, ill try now this thing up

oh okay,thanks good luck and bye