repeat
players.PlayerAdded:Wait()
until #players:GetPlayers() >= 1
local RopeConstraint = Instance.new("RopeConstraint")
RopeConstraint.Parent = workspace
RopeConstraint.Length = 50
RopeConstraint.Visible = true
RopeConstraint.Restitution = 1
RopeConstraint.Color = BrickColor.new("Institutional white")
local PlayerObjects : {Player} = players:GetPlayers()
print(PlayerObjects)
print(PlayerObjects[1])
local attachment0 = Instance.new("Attachment")
attachment0.Name = "RopeAttachmentPlayer1"
attachment0.CFrame = CFrame.new(0, 0,0)
attachment0.Parent = PlayerObjects[1]:FindFirstChild("HumanoidRootPart")
RopeConstraint.Attachment0 = attachment0
local attachment1 = Instance.new("Attachment")
attachment1.Parent = PlayerObjects[2].PrimaryPart.rootAttachment
RopeConstraint.Attachment1 = attachment1
I used above server script to make two player connected with ropeconstraint. But when I tested with two player attachment0 and attachment1 of ropeconstraint is empty…What is the problem?