I have got a serious problem that I have been trying to solve for a long time. See, I have a part that has a damage script under it. Now I know the damage script will work, because if I don't change the parent, it does. But the goal here is to use a script to change the parent of the part with the damage script applied to it, and have the damage script still working at the end. Here is my damage script, which I know works.
local Damagepack = script.Parent --This script is a ServerSide script
local damageAmount = -25 --I also have FilteringEnabled on
Damagepack.Touched:Connect(function(otherPart)
local Character = otherPart.Parent
local Humanoid = Character:FindFirstChild("Humanoid")
if Humanoid then
local currentHealth = Humanoid.Health
local newHealth = currentHealth + damageAmount
Humanoid.Health = newHealth
end
end)
I used a simple local script to change the Parent:
local Tool = script.Parent
Tool.Activated:Connect(function()
local Example = script.Parent.Part
Example.Parent = game.Workspace
Tool:Destroy()
end)
Here is how everything is arranged:
Tool (Tool)
LocalScript (The parent - changer)
Part (Part that has damage script applied to it)
DamageScript (Script that does damage)
Can you help me?

2 comments
Ah it's because you're only setting the parent locally
^ Which I edited my answer for