I’m trying to make a tool that summons something called a Galaxy Orb, which collects any parts caught in the blast radius of the tool (the bomb) and adds a SpringConstraint
that links both of the parts, with the Galaxy Orb pulling the part in depending on the range of the SpringConstraint
.
But here are the issues.
-
The spring constraint for some reason works and then stops working then the player and or parts are teleported to the Galaxy Orb.
-
Buildings inside of the game are comprised of a bunch of welds between multiple parts, and even when completely deleting welds from one part since other parts have welds that connect to that part, they still are connected which causes parts of the building to teleport.
This is the line of code that makes the springs, and this is what the welds look like between two parts of a building.
for i, v in pairs(parts) do
if v.Name == "TaggedGameBrick" or game.Players:GetPlayerFromCharacter(v.Parent) then
local spring = Instance.new("SpringConstraint")
spring.Enabled = true
spring.LimitsEnabled = true
spring.MinLength = 0
spring.MaxLength = math.random(0, 7)
spring.Attachment0 = Instance.new("Attachment")
spring.Attachment0.Parent = galaxyOrb
spring.Attachment1 = Instance.new("Attachment")
spring.Attachment1.Parent = v
spring.Parent = galaxyOrb
end
end