I made a vest and I am trying to attach it and weld it to the player's uppertorso but i keep getting this error that says "Flak Jacket:4: Expected '(', '{' or , got ':'".
I thought I wasn't doing anything wrong but that happened, here's my script. Pay Attention to the "playeradded connect" part.
local Lighting = game.Lighting
local Vest = Lighting:WaitForChild("Flak Jacket")
game.Players:PlayerAdded:Connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("UpperTorso")
local ClonedVest = Vest:Clone()
ClonedVest.Parent = character
ClonedVest:SetPrimaryPartCFrame(character:WaitForChild("UpperTorso").CFrame)
local Weld = Instance.new("Weld")
Weld.Part0 = ClonedRH.Main
Weld.Part1 = character:WaitForChild("UpperTorso")
Weld.Parent = character:WaitForChild("UpperTorso")
end)
end)

2 comments
sorry i got confused
It's alright