1 | local pos 1 = { 250 , 0 , 250 } |
2 | local pos 2 = { - 250 , 0 , - 250 } |
3 | game.Players.PlayerAdded:Connect( function (plr) |
4 | plr.Chatted:Connect( function () |
5 | local part = Instance.new( "Part" , game.Workspace) |
6 | part.Anchored = true |
7 | part.Position = Vector 3. new(math.random(#pos 1 , #pos 2 )) |
8 | end ) |
9 | end ) |
I am struggling please help.
This should work
01 | --Must go from low to high |
02 | x = math.random( 0 , 100 ) |
03 | y = math.random( 0 , 100 ) |
04 | z = math.random( 0 , 100 ) |
05 |
06 | game.Players.PlayerAdded:Connect( function (Player) |
07 | Player.Chatted:Connect( function () |
08 | local part = Instance.new( "Part" , game.Workspace) |
09 | part.Anchored = true |
10 | part.Position = Vector 3. new(x,y,z) |
11 | end ) |
12 | end ) |
01 | --pos1 dictionary-- |
02 | local pos 1 = |
03 | { |
04 | 250 , |
05 | 0 , |
06 | 250 |
07 | } |
08 | --pos2 dictionary-- |
09 | local pos 2 = |
10 | { |
11 | - 250 , |
12 | 0 , |
13 | - 250 |
14 | } |
15 | game.Players.PlayerAdded:Connect( function (plr) --when player chats |