Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Parts duplicating nonstop after check if it's not a certain name?

Asked by 4 years ago

Title, I'm trying to make a method that replicates my body C0 and C1 positions along with any other parts to the server. if you want me to explain better: When a part is made on the client, it checks if it's not or does not have "ServerReplicatedPart" in it, and if it doesn't, it makes it on the server with active updates of the CFrame and size, name, color, etc... If you need, I can supply any of the necessary scripts for the RemoteFunctions.

01local chr = game:GetService("Players").LocalPlayer.Character
02repeat wait() until chr.Torso:FindFirstChild("Neck") ~= nil
03 
04game:GetService("RunService").RenderStepped:Connect(function()
05    game:GetService("ReplicatedStorage").Body:FireServer({
06        RS = chr.Torso["Right Shoulder"].C0,
07        LS = chr.Torso["Left Shoulder"].C0,
08        RH = chr.Torso["Right Hip"].C0,
09        LH = chr.Torso["Left Hip"].C0,
10        N = chr.Torso["Neck"].C0,
11        R = chr.HumanoidRootPart["RootJoint"].C0
12    },
13    {
14        RS = chr.Torso["Right Shoulder"].C1,
15        LS = chr.Torso["Left Shoulder"].C1,
View all 45 lines...

Answer this question