Tool not moving

Hello,
I’m making a lightsaber customization and it works perfectly until you equip the tool. Once you equip the tool for the first time it no longer will move the tool. Here’s a video to show what happens.


The scripts are

-- Customize Button
local camera = game.Workspace.CurrentCamera
local saber = game.Players.LocalPlayer.Backpack.Saber

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Visible = false
	script.Parent.Parent.Parent.CustomizeSaber.CloseButton.Visible = true
	saber.Handle.AnakinHandle.PrimaryPart = saber.Handle
	camera.CameraType = "Scriptable"
	camera.CFrame = CFrame.new(-146, 30, 103.5)
	saber.Parent = game.Workspace
	saber.Handle.CFrame = CFrame.new(-146, 27, 103.5)
	saber.Handle.Anchored = true
end)
-- Close Button 
local camera = game.Workspace.CurrentCamera
local Sabers = game.Workspace
local saber = game.Players.LocalPlayer.Backpack.Saber.Handle

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Visible = false
	script.Parent.Parent.Parent.CustomizeButtonFrame.CustomizeButton.Visible = true
	camera.CameraType = "Custom"
	Sabers:FindFirstChild("Saber").Parent = game.Players.LocalPlayer.Backpack
	saber.Anchored = false
end)
1 Like

The parent of the tool moves to the player’s Backpack, meaning it won’t be rendered in the workspace anymore. Try using a .Unequipped() event to re-parent it.

1 Like

Change:

Sabers:FindFirstChild("Saber").Parent = game.Players

To:

Sabers:FindFirstChild("Saber"):Clone().Parent = game.Players

Explaination:
You are setting the Parent of that Object to the Player Backpack but there is only one saber there so it will be removed from there and put in to the Player.

1 Like

Unforunatly neither of these worked… :frowning:

1 Like

It might be because when you set the handle’s CFrame (which I assume is transparent), only the transparent object is moved and the rest of the model doesn’t. Try setting the model’s primary part to the handle and then see if that works.

1 Like

That didn’t work either… I’m so confused why this isn’t working lol

1 Like

try using SetPrimaryPartCFrame() on the model which contains all of the saber’s parts. Make the primary part of the model where you want the middle of the saber to appear.

Model:SetPrimaryPartCFrame(CFrame.new(-146, 27, 103.5)) -- replace Model with the mentioned model of all of the saber's parts
saber.Anchored = true

The issue here is that you are using the same Saber object in both of your situations.
This is not the correct way to go about what you are trying to do. Instead, you should create a clone of the Saber that they will have in their backpack, and then utilize that in the Customization UI.

From there, you can make changes to the Saber object in the player’s backpack using the Customization UI.