So I'm working on a cloud system that uses a beam that goes over the whole map. When I made it manually in studio, everything worked fine. Then, when I wrote a Module Script to do it for me, it didn't. Basically, no errors, but it only sets the beam's Attachment0 and Attachment1 properties, however nothing else is changed. My code:

	local part1 = Instance.new("Part", workspace)
	part1.Anchored = true
	part1.Size = Vector3.new(1, 1, 4056)
	part1.Position = Vector3.new(2048, 450, 0)
	part1.Transparency = 1
	local attachmentA = Instance.new("Attachment", part1)
	attachmentA.Orientation = Vector3.new(90,0,0)
	
	local part2 = Instance.new("Part", workspace)
	part2.Anchored = true
	part2.Size = Vector3.new(1, 1, 4056)
	part2.Position = Vector3.new(-2048, 450, 0)
	local attachmentB = Instance.new("Attachment", part2)
	
	local beam = Instance.new("Beam", part1)
	beam.Attachment0 = attachmentA
	beam.Attachment1 = attachmentB
	beam.Texture = "rbxgameasset://Images/iu"
	beam.TextureSpeed = 0.05
	beam.Color = Color3.fromRGB(50,50,50)
	beam.Transparency = 0
	beam.Width0 = 4056
	beam.Width1 = 4056

Help would be appreciated.