I wish to change the projectile of a tool / weapon that uses raycast in it's scripting. Heres a code snippet of the current tool's code from the original version first to my modified version that I am in the process of changing.
Original Projectile Code:
Bullet=Instance.new("Part")
Bullet.Name="Bullet"
Bullet.BrickColor=BrickColor.new("Really red")
Bullet.Anchored=true
Bullet.CanCollide=false
Bullet.Locked=true
Bullet.Size=Vector3.new(1,1,1)
Bullet.formFactor=0
Bullet.TopSurface=0
Bullet.BottomSurface=0
Bullet.Transparency = 0.5
mesh=Instance.new("BlockMesh")
mesh.Parent=Bullet
mesh.Name="Mesh"
mesh.Scale=Vector3.new(.05,.05,1
Modified Projectile Code:
Bullet=Instance.new("Part")
Bullet.Name="Lasbolt"
Bullet.BrickColor=BrickColor.new("Bright red")
Bullet.Anchored=true
Bullet.CanCollide=false
Bullet.Locked=true
Bullet.Size=Vector3.new(1,1,1)
Bullet.FormFactor=0
Bullet.TopSurface=0
Bullet.BottomSurface=0
Bullet.Transparency = 0.5
mesh=Instance.new("CylinderMesh")
mesh.Parent=Bullet
mesh.Name="Mesh"
mesh.Scale=Vector3.new(.05,.05,1)
I'm trying to change the original 'ray' projectile fired by the script into a cylinder mesh, but it doesn't seem to be working correctly. I'm really new to the world of scripting, becoming really involved after wishing to start my own clan, and I'd like some aid from more experienced veterans of ROBLOX. If there is another way to change the projectile into a cylinder mesh instead of a block one please inform me as soon as you can.

3 comments
Please use code blocks; it's easier to read.
Please put your code in a code block. A code block is the little blue Lua symbol. Put your code in the center of the two squiggly lines, leaving the squiggles each with their own line. Also make sure to tab your code correctly.
I put it into a code block so its easier to read.