1 | local char = player.Character |
2 | local hands = { char.LeftHand,char.RightHand } |
3 | local q = Instance.new( "BodyVelocity" ) |
4 | local xclone = game.Lighting:WaitForChild( "fireball" ):Clone() |
5 | xclone.Parent = workspace |
6 | xclone.Position = math.random( 1 ,#hands.Position) |
Create 3 values for X,Y, and Z.
1 | local z = math.Random( 1 ,#hands.Position) |
2 | local x = math.Random( 1 ,#hands.Position) |
3 | local x = math.Random( 1 ,#hands.Position) |
4 | xclone.Position = vector 3. new(x,y,z) |
you cannot random a vector3 value because it has 3 values in it.
so what you can do is,
xclone.Position = hands.Position + Vector3.new(math.random(-10, 10), 0, math.random(-10,10))
you can change all the 10s to whatever you like. but be careful of y, if you set too low, it may fall out of the world.