#spring constraints

1 messages · Page 1 of 1 (latest)

pallid harness
#

so i got this module script that ima use to connect 2 players with a spring but the spring seems to be glitchy even tho i read the forums and still dont know how ppl managed it

local setup = {}

setup.SetupPlayers = function(player1, player2)
    local Players = game:GetService("Players")

    
    local plr1 = Players:FindFirstChild(player1)
    local plr2 = Players:FindFirstChild(player2)
    
    if not (plr1 and plr1.Character and plr1.Character:FindFirstChild("HumanoidRootPart")) then return end
    if not (plr2 and plr2.Character and plr2.Character:FindFirstChild("HumanoidRootPart")) then return end
    
    local A0 = Instance.new("Attachment")
    A0.Name = "Attachment0"
    A0.Parent = plr1.Character.HumanoidRootPart
    local A1 = Instance.new("Attachment")
    A1.Name = "Attachment1"
    A1.Parent = plr2.Character.HumanoidRootPart
    
    local spring = Instance.new("SpringConstraint")
    spring.Attachment0 = A0
    spring.Attachment1 = A1
    spring.Stiffness = 5      
    spring.Damping = 1        
    spring.FreeLength = 10 
    spring.Parent = workspace
end

return setup
thin zinc
#

you would have to give either one player of the server network ownership of both players because otherwise it will conflict and cause problems

pallid harness
thin zinc
#

for the server

#

or if you just want one player to have ownership replace nil with that player's player instance