How would i make this client sided?

i am trying to convert a pressure plate script so that it only shows for one player only, any idea how? there will be a lot of these parts.

script.Parent.Touched:Connect(function(HIT) --dont edit
	if HIT.Parent:FindFirstChild("Humanoid")then
		
		script.Parent.Part.Transparency = 0.3  
		script.Parent.Part.CanCollide = false  
		wait(6) 
		script.Parent.Part.Transparency = 0 
		script.Parent.Part.CanCollide = true 
		wait(1)
	

		
		
	end
end)

you can just put it in a localscript and it should work. However, keep in mind that localscripts only run if they are parented to the Player’s playerinstance or character, so you may have to change the path from script.parent to something like workspace.PressurePlate.

i have thought of that, however there will be a lot of parts like this, making each one would be impractical

Use CollectionService. This services allows you to add “tags” to Instance, especially BaseParts, and you can get all the Instances with the associated “tag”.

yeah wouldn’t that make the parts go off all at once?

you could use a function or modulescript to make it less redundant, the idea being that you can call a line of code multiples times without having to retype the whole thing.

You will attach each part a different Touched event. How would that make all parts go off at once?

i only used collection service before in a killbrick script, how would i go about this? would i have to create hundreds of tags for each one?