Parts not un-anchoring?

Hello! I am trying to make a shockwave tool that un-anchors all parts that it touches. With my current code it is not un-anchoring the parts even though all the prints go off.

local TweenService = game:GetService("TweenService")
game.ReplicatedStorage.FireHammer.OnServerEvent:Connect(function(Player)
	local ShockPos = Player.Character:FindFirstChild("Head")
	local ShockPart = Instance.new("Part")
	ShockPart.Position = ShockPos.Position + Vector3.new(0, 2, 0)
	ShockPart.Shape = Enum.PartType.Ball
	ShockPart.Anchored = true
	ShockPart.Transparency = 0.2
	ShockPart.CanCollide = false
	ShockPart.CanTouch = true
	ShockPart.Material = Enum.Material.Neon
	ShockPart.Color = Color3.new(1, 0.784314, 0)
	ShockPart.Parent = game.Workspace
	ShockPart.Touched:Connect(function(hit)
		if hit.ClassName == "Part" or hit.ClassName == "MeshPart" then
			hit.Anchored = false
			print("Unanchored part "..hit.Name.."!")
		else
			for i , v in pairs(hit:GetDescendants()) do
				v.Anchored = false
			end
			print("Unanchored descendants of "..hit.Name.."!")
		end
	end)
	local Tween = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local Tween1 = TweenService:Create(ShockPart, Tween, {
		Size = Vector3.new(200, 200, 200)
	})
	Tween1:Play()
	wait(3)
	local Tween2 = TweenInfo.new(5)
	local Tween3 = TweenService:Create(ShockPart, Tween2, {
		Transparency = 1
	})
	Tween3:Play()
	wait(5)
	ShockPart:Destroy()
end)

If anyone is curious the LocalScript that fires the event is this,

script.Parent.Activated:Connect(function()
    game.ReplicatedStorage.FireHammer:FireServer()
end)

Are the parts welded or constrained to other parts? Check the actual property on the parts

Since the prints are going off there is no reason it shouldn’t be working. The only other possibility is that the server doesn’t have network ownership over the parts.

My guess is the .Touched event isn’t firing as the tween grows the part. You can throw in a print statement to see if that event is being fired.

Edit: I missed your bit about “all the prints go off”.

The model I am using to test has no welds or constraints. When I click on the parts in workspace they still show as anchored. I am not sure what network ownership is but I will look into it.

I also have another question. What object would I set the network ownership on?

The network ownership of a part should be the server by default. Are the parts being created by a localscript? I don’t really see any other reason that the server wouldn’t have network ownership.

That is very weird. Everything except for the RemoteEvent firing is server side (including the part).

Also I do not know if this would be useful but these are the only 2 scripts in the entire place.

1 Like