Swing parts local?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want it so that the parts in my game with rope constraints holding it up are local.
  2. What is the issue? Include screenshots / videos if possible!
    I do not know how to make parts like these local.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I looked at videos such as AlvinBlox’s local parts tutorial, but that didn’t help. I tried looking at the JTOH swing part script, but that didn’t help either.

This is the easiest way I know. Put all your parts with their restrictions inside a model (or models), save the model (or models) in a place inside ReplicatedStorage, create a LocalScript inside StarterPlayerScripts, inside the script clone the model (or models). These clones are already completely local. So put the model (or models) somewhere inside workspace

1 Like

Okay so I did this and yet they are not local. Is my script wrong? By the way this is a local script inside the StarterPlayerScripts.

local wobblies = workspace.Tower1.Wobblies:GetChildren() --variable that gets the swing folder

for _, wobbly in pairs(wobblies) do --a for loop that goes through all of the swing parts
	wobbly.Parent = game.ReplicatedStorage --makes its parent the replicated storage
	print("Parented to replicatedstorage") --verifys that the wobbly is parented to the replicated storage
	wobbly:Clone() --clones the wobblies or swings
	print("Cloned") --prints cloned
	wobbly.Parent = workspace.Tower1.Wobblies --new parent after being cloned
end

The model should be stored in replicated storage. The purpose of the script is to clone it from replicated storage into workspace, your script is the other way around.

1 Like

try this

local wobblies = workspace.Tower1.Wobblies:GetChildren() --variable that gets the swing folder

for _, wobbly in pairs(wobblies) do --a for loop that goes through all of the swing parts
	wobbly.Parent = game.ReplicatedStorage --makes its parent the replicated storage
	print("Parented to replicatedstorage") --verifys that the wobbly is parented to the replicated storage
	local wobblyClon = wobbly:Clone() --clones the wobblies or swings, this clone is completely local
	print("Cloned") --prints cloned
	wobblyClon.Parent = workspace.Tower1.Wobblies --parenting the clone to workspace
end
1 Like

Okay so I did this script and I didn’t exactly get the results I wanted.

local wobblies = workspace.Tower1.Wobblies:GetChildren()

for _, wobbly in pairs(wobblies) do
	wobbly.Parent = game.ReplicatedStorage
	local wobblyclone = wobbly:Clone()
	wobblyclone.Parent = workspace.Tower1.Wobblies
end

Some of the parts have rope constraints to hold other parts up like a swing, but for some reason, the script didn’t clone them.

Make sure you are doing this: what you are cloning must be models, all the parts that are joined by a rope must be in the same model and all the model’s descendants must have the “archivable” property marked.
Baseplate4.rbxl (20.0 KB)

1 Like

Hmm. I have did this yet they are still not local. Now the constraints work but they are not local.

Script:

local wobblies = workspace.Tower1.Wobblies:GetChildren()

for _, wobbly in pairs(wobblies) do
	wobbly.Parent = game.ReplicatedStorage
	local wobblyclone = wobbly:Clone()
	wobblyclone.Parent = workspace.Tower1.Wobblies
end