Beam Mesh 'Deforming [RESOLVED]

I have encountered a bug that I either am not searching the right keywords since I don’t know what exactly to call it or someone hasn’t really talked about the same bug. Eitherway, I am experiencing a bug that I’ve tried numerous ways to solve even going back to older devforum posts I made to help with making the mesh function and stuff like that and using that code but it still didn’t work. If anyone can point me towards the right direction, that will be greatly appreciated. Thank you in advance.

Snippet of positioning code:

					local throwerTip = Tool.Handle.OpenBarrel.Tip
					local streamFolder = game.Workspace.StreamData:WaitForChild("clientStream")
					local properties1 = {
						["WorldPosition"] = ((streamFolder.Segment1.WorldPosition + streamFolder.Segment3.WorldPosition) / 2) + Vector3.new(math.random(-3,3), math.random(-3,3), math.random(-3,3))
					}
					local properties2 = {
						["WorldPosition"] = ((streamFolder.Startpoint.WorldPosition + streamFolder.Segment2.WorldPosition) / 2) + Vector3.new(math.random(-3,3), math.random(-3,3), math.random(-3,3)) 
					}				
					local properties3 = {
						["WorldPosition"] = ((streamFolder.Segment2.WorldPosition + streamFolder.Endpoint.WorldPosition) / 2) + Vector3.new(math.random(-3,3), math.random(-3,3), math.random(-3,3)) 
					}
					local tween1 = tweenService:Create(streamFolder.Segment2, tweenInfo, properties1)
					local tween2 = tweenService:Create(streamFolder.Segment1, tweenInfo, properties2)
					local tween3 = tweenService:Create(streamFolder.Segment3, tweenInfo, properties3)
					hitPart.Position = MousePos
					streamEffect.Startpoint.WorldPosition = throwerTip.Position
					streamEffect.Endpoint.WorldPosition = hitPart.Position
					tween1:Play()
					tween2:Play()
					tween3:Play()
					game.Workspace.StreamData:WaitForChild("Stream").Transparency = 1
					if ((hitPart.Position - MousePos).magnitude) > 100 then
						hitPart.Position = MousePos
					end

Image Example:

image
image

1 Like

Please tell us exactly what you are seeing in the pictures, and what you expect to see.
(Also remember that the term ‘bug’ usually refers to a problem with the game engine, not a script problem)
I can only assume you mean the orange beam has a different shape? It’s the only difference I notice.

I don’t know, but is the problem the order you have your tween information?

local tween1 = tweenService:Create(streamFolder.Segment2, tweenInfo, properties1) -- 2 to 1?
local tween2 = tweenService:Create(streamFolder.Segment1, tweenInfo, properties2) -- 1 to 2?
local tween3 = tweenService:Create(streamFolder.Segment3, tweenInfo, properties3) -- 3 to 3?
1 Like

My bad, also I wasn’t aware that was what the term bug was for.

The orange beam is a different shape, the shape is supposed to resemble this when going to either end, one straight line:

Instead it’s deforming. I also already tried with just disabling the tween playing and it still ends up doing what it does.

1 Like

Do you have the beam’s FaceCamera setting checked true so if faces the player’s camera?

1 Like

There is no setting and I probably should of specified which is completely my bad and my fault that it isn’t an actual attachment beam, I should of probably just called it a laser since it is a blender mesh with bones inside of it that are tweened/moved to the proper positions.

2 Likes

Found out the bones I had on the end were smaller than the bones I had throughout the rest of the beam and that is what was messing it up.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.