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 <string>, 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)
On line 4, You put game.Players:PlayerAdded:Connect(function(player)
, Which is wrong you are supposed to put game.Players.PlayerAdded:Connect(function(player)
. Please do some research before asking next time.