I'm trying to get 7 objects from my replicated storage to copy when the player spawns and weld themselves to the player. I have the welding part done but I can't get the player to spawn with these objects already welded to them. How would i do this?
Upon the character spawning, you should clone the parts to weld into the player's character and then weld them from there. To detect a character spawning, use the CharacterAdded
event of any player. You're going to want this to happen for each player that joins so use PlayerAdded
for detecting that. When the character is spawned, you're going to face one problem, the parts aren't loaded in instantly; to avoid this being an error, simply :WaitForChild()
on each of the parts you want to weld to.
game.Players.PlayerAdded:connect(function(plr) -- When a player joins plr.CharacterAdded:connect(function(char) -- When their character spawns in local torso = char:WaitForChild("Torso") -- Wait for the torso to exist --// Add your welding stuff here end) end)
I hope this helps, if it doesn't, comment below with the problem you're faced with. If this works for you then accept it as the answer so people know this question has been answered.
If you're unable to add your welding script to this you could supply me with the code you have prepared for the welding and I could add it into the code supplied.