My part's parent won't change from ReplicatedStorage to Workspace

  1. What do you want to achieve? Keep it simple and clear!
    I want to press a Gui Button and make the part/s move from ReplicatedStorage to Workspace

  2. What is the issue? Include screenshots / videos if possible!
    I’ve got a button that will move the part from Workspace to ReplicatedStorage, but when it comes to moving the part out of ReplicatedStorage back into Workspace, I get the error shown below:

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I’ve tried looking on the DevForum, but couldn’t find anything.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

This script is inside the button that moves the part from Workspace to ReplicatedStorage

script.Parent.MouseButton1Click:Connect(function()
	workspace.TESTPART1.Parent = game.ReplicatedStorage
end)

This script (that is the issue) needs to move the same part from ReplicatedStorage to Workspace.

script.Parent.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.TESTPART1 = game.Workspace
end)

Any help with my issue is greatly appreciated! :slight_smile:

You forgot to add .Parent so the script thinks you’re referring to TESTPART1 as a property of ReplicatedStorage. :sweat_smile:

game.ReplicatedStorage.TESTPART1 = game.Workspace

1 Like

It’s saying that parent isn’t a valid member of the part.

script.Parent.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.TESTPART1.parent = game.Workspace
end)

Capitalization is important. Make sure it’s capitalized .Parent.

I knew something looked wrong on that line.

It works now! Thank you so much! :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.