The reason is you cant detect .Touched events from a local script, to do this from a local script you would need to fire events or use remote functions.
The name of “local” scripts imply it is ran by the player, so placing it in a part not related to the player it will not run. You can solve this by placing the local script in one of the player objects. (keep in mind other players will not be able to see what happens in a localscript except the player it is in. (personally I would probably find some fancy way of doing it.)
The reason you are experiencing this issue is because LocalScripts run on the client. If you want to stick with LocalScripts you must parent them somewhere in the Client such as PlayerGui or StarterPlayerScripts.
The second issue is that you are connecting your .Touched event to script.Parent which won’t work because your new parent will be either PlayerGui or StarterPlayerScripts. You must localize your instance such as local part = workspace.Path.To.Part then part.Touched:Connect(...).
This is because when one player touches the part, every client will register the touch. You need to use Players:GetPlayerFromCharacter to ensure the Player.LocalPlayer is the player who touched the part:
local players = game:GetService("Players")
local localPlayer = players.LocalPlayer
part.Touched:Connect(function(otherPart)
local character = otherPart.Parent
local player = players:GetPlayerFromCharacter(character)
if player ~= localPlayer then return end
-- continue...
end)