This is what I have but it there's a problem somewhere
Part = script.Parent.Vest players = game.Players:GetChildren() for i = 1,#players do Part:clone(i) Part.Parent = players[i].Character end
I am writing this answer, by the time I post it there might be another answer. If there is, PLEASE look at all the answers since this one took over 30 minutes to write.
This event runs when a player joins a game.
game:GetService("Players").PlayerAdded:connect(function(player) print(player.Name.." has joined the game!") end)
The event fires when a player's character is created, whether it's from joining a game or respawning.
game:GetService("Players").PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) print(player.Name.." spawned.") end) end)
There are 2 ways of teleporting models. 1. MoveTo() 2. SetPrimaryPartCFrame()
MoveTo needs a vector3 value to be teleported. The center of the model will be teleported to the position.
workspace.Model:MoveTo(workspace.Player.Torso.Position)
It may seem annoying but! It's useful for changing ROTATION, using CFrame.Angles. SetPrimaryPartCFrame needs a CFrame value and the model will be teleported. The primary part will be teleported to the location, and the rest of the model will follow. It will only work with a primary part.
workspace.Model:SetPrimaryPartCFrame(workspace.Player.Torso.CFrame)
Welding makes parts stick together like Lego Bricks(I do not own the Lego™, all rights go to the Lego company) you can weld parts that are not even touching! You can break welds using BreakJoints() and make welds by using MakeJoints().
This event if optional. It runs whenever a humanoid's health reaches 0, either by disconnecting the head and torso or by damage.
game:GetService("Players").PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character.Humanoid.Died:connect(function() print(player.Name" has died!") end) end) end)
local vest = script.Parent.Vest:clone() game:GetService("Players").PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) vest.Parent = character vest:MoveTo(character.Torso.Position) --Using moveto incase you don't have a primary part character:MakeJoints() --Make sure that the vest has welds in it. end) end)
Hope this helps!