local LPlayer = game.Players.LocalPlayer
local Character = LPlayer.Character

local RArm = Character:WaitForChild("Right Arm")
local LArm = Character:WaitForChild("Left Arm")
local RLeg = Character:WaitForChild("Right Leg")
local LLeg = Character:WaitForChild("Left Leg")
local Head = Character:WaitForChild("Head")
local Torso = Character:WaitForChild("Torso")

local Root = Character:WaitForChild("HumanoidRootPart")

--[[
	Order:
	R Arm
	L Arm
	R Leg
	L Leg
	Head
	Torso		
--]]
	
local DefaultCFrames = {
CFrame.new(-1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
CFrame.new(-0.5, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),			
CFrame.new(0.5, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),	
CFrame.new(0, -1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
CFrame.new(0,0,0)	
}	
	
	
function CreateWeld(WeldParent,P0,P1,CF)
local Weld = Instance.new("Weld",WeldParent)
Weld.Part0 = P0
Weld.Name = P0.Name
Weld.Part1 = P1
Weld.C0 = CF
return Weld
end	

function WeldBody(SPlayer)
local WeldFolder=Instance.new("Folder",SPlayer.Character)  --Make folder cilent sided for renderstepped animations
WeldFolder.Name = "PlayerWelds"
local RightArmWeld = CreateWeld(WeldFolder,RArm,Root,DefaultCFrames[1])
local LeftArmWeld = CreateWeld(WeldFolder,LArm,Root,DefaultCFrames[2])
local RightLegWeld = CreateWeld(WeldFolder,RLeg,Root,DefaultCFrames[3])
local LeftLegWeld = CreateWeld(WeldFolder,LLeg,Root,DefaultCFrames[4])
local HeadWeld = CreateWeld(WeldFolder,Head,Root,DefaultCFrames[5])
local TorsoWeld = CreateWeld(WeldFolder,Torso,Root,DefaultCFrames[6])	
end

WeldBody(LPlayer)	
game.Players.PlayerAdded:connect(function(SPlayer)
print(SPlayer.Name)
WeldBody(SPlayer)
end)

--local UpdateCFrames = game.Workspace.UpdateCFrameValues:InvokeServer(DefaultCFrames)

The "WeldBody(SPlayer)" won't make my folder cilent sided. Please help.

2 comments

0

Roblox is a bit funny about the Character in that anything put into the Character has a tendency to replicate, counterintuitively. I don't know if they've changed this since.

0

It does the same in the player, when I create custom GUI's they have a tendency to replicate 8 to 3 times.