Is there any way to make server scripts work locally

I am making an obby game and am adding a lot of moving parts to my game. This caused severe lag when they were on the server, so I did what tower of hell did and just make all the moving parts just appear locally. I found out that if a model is in replicated storage and is moved into the workspace by the client, then any server scripts inside of it won’t work. Like a kill script or something. Tower of hell has a lot of moving parts and im like 99% sure they are all local however they still have moving kill parts which means they have scripts in them that work, so I was wondering how were they able to make it work.

The scripts won’t work because changing the Parent locally doesn’t affect the server.
If you change something on the client, it’s not visible for server or for anyone else.
So the server still sees just 1 part in ReplicatedStorage and no parts in the workspace.

The moving parts seemed laggy because the server script moved them, not because the server parented them.
Server movement is laggy as the replication is not instant.
To fix it, use local script to make the parts move and kill the player.

Inserting a new script to each part is really bad, even if the script is only responsible for a simple action.
You should make only one script and handle all the kill parts from there.

for _, part in next, workspace:GetDescendants() do
  if part.Name ~= 'KillPart' then continue end

  part.Touched:Connect(function(hit)
    local hum = hit.Parent:FindFirstChildWhichIsA('Humanoid')
    if hum then
      hum.Health = -1
    end
  end)
end

A simple script that takes all the parts called KillPart and makes them kill the player that touched them.

How could I see local scripts to make the parts move. because some of the moving parts players need to stand on I used constraints like hinge and prismatic.