Part.Touched not working after being parented from ServerStorage

So I am trying to make an equippable power-up. I stored it inside of ServerStorage so I can parent it to the workspace later. However, when I play my game, after parenting the power-up to Workspace, I couldn’t equip it.

Here’s the script that handles the power-up:

local RmtEvent = game.ReplicatedStorage.ItemEquip
local CollectionService = game:GetService("CollectionService")

local ElectricBatteries = CollectionService:GetTagged("ElectricBatteries")

for i,v in pairs(ElectricBatteries) do
	local RootPart = v:FindFirstChild("RootPart")
	
	while true do
	    RootPart.CFrame = RootPart.CFrame * CFrame.fromEulerAnglesXYZ(0.1, 0, 0)
	    wait(0.05)
    end
	
	v:FindFirstChild("Base").Touched:Connect(function(hit)
		if game.Players:GetPlayerFromCharacter(hit.Parent) then
			
			print("Doing Stuff...")
			local Char = hit.Parent
			local EquipSFX = script.EquipSFX:Clone()
			RmtEvent:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent), "ElectricForce")
			EquipSFX.Parent = v.Base
			EquipSFX:Play()
			
			EquipSFX.Ended:Wait()
			
			wait(1)
			
			v:Destroy()
			
			print("Task Finished")
	    end
	end)
end

Is it because I need to store the power-up inside of ReplicatedStorage instead or something else? Let me know! :smiley:

Did you mean to wrap the while loop in a coroutine? That’s what’s holding up the program.

coroutine.wrap(function()
    while true do
	    RootPart.CFrame = RootPart.CFrame * CFrame.fromEulerAnglesXYZ(0.1, 0, 0)
	    wait(0.05)
    end
end)()

Ok I will try using that now. :smiley:

Nope. It doesn’t seem to work :frowning_face: