How can I end this script?

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(plr)
Players.CharacterAdded:Connect(function(char)
if plr.MembershipType == Enum.MembershipType.None then
		local trail = game.ServerStorage.Trail:Clone()
		trail.Parent = char.Head
		local attachment0 = Instance.new("Attachment",char.Head)
		attachment0.Name = "TrailAttachment0"
		local attachment1 = Instance.new("Attachment",char.HumanoidRootPart)
		attachment1.Name = "TrailAttachment1"
		trail.Attachment0 = attachment0
		trail.Attachment1 = attachment1

1 Like
end
end)
end)

at the end since there are 3 arguements.

1 Like

Can you help me with this? How can I end this?

local Trail = game.ServerStorage["Trail"]

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if plr.MembershipType == Enum.MembershipType.None then
	local plrTrail = Trail:Clone()
	plrTrail.Parent = char.HumanoidRootPart
	if char:FindFirstChild("UpperTorso") then
		plrTrail.Attachment0 = char.Head.FaceFrontAttachment
			plrTrail.Attachment1 = char.UpperTorso.WaistRigAttachment
			else
				plrTrail.Attachment0 = char.Head.FaceFrontAttachment
				plrTrail.Attachment1 = char.Torso.WaistBackAttachment


Is the else for if the script can’t find the upper torso?

If so it would be

end
end
end)
end)
1 Like

Yes it is, The else is for the moment when the script can’t find the upper torso

Is the second if statement supposed to run if the first one works?