I want to enable gui just for the one who pressed the part

Okay so, this script shows the gui for every player in the game when a player touch it. I just want to show it for the player who touch

(I tried to make it work from server script (Of course I changed local player part to fire:Client remote event) But if I put it to server script it won’t work properly. If there is 3 player touching the part at the same time then other 2 player can’t see the gui until first touched player stops touching) if it possible I would rather to make it from server side

this is a local script

local players = game:GetService("Players")

local ScriptableFolder = game.Workspace:FindFirstChild("SccriptYapılabilirObjeler")
local replicatedStorage= game:GetService("ReplicatedStorage")
local remotes = replicatedStorage:WaitForChild("Remotes")

local db = true
ScriptableFolder.MagazaAcar.Touched:Connect(function(hit)
	local player = players.LocalPlayer
	if hit.Name == "HumanoidRootPart" and db== true then	
	player.PlayerGui.Shopik.Enabled = true
		local connection do
			db= false
			connection = ScriptableFolder.MagazaAcar.TouchEnded:Connect(function(hitEnd)
				if hit == hitEnd then
					local hitModel = hitEnd:FindFirstAncestorOfClass("Model")
					if hitModel then
						local hitPlayer = players:GetPlayerFromCharacter(hitModel)
						if hitPlayer then
							print(hitEnd.Name.." stopped touching part.")
							db = true
						end
					end
				end
			end)
			print("We got the Data Bro Relax")
		end
	end	
end)

Here are the steps

Step 1: add a script to your part

Step 2: use this code for your new script

Edit: i have tested the code and got errors
so add this to your script

local Players = game:GetService("Players") -- Get the players

script.Parent.Touched:Connect(function(whateverthattouched) -- when a player touches the part
	print(whateverthattouched)
	local Char = whateverthattouched.Parent:FindFirstChild("Humanoid") -- it finds the humanoid of the person
	print(Char)
	local Player = Players:GetPlayerFromCharacter(Char.Parent) -- it finds the player
	print(Player.Name) -- Test
	local Gui = Player.PlayerGui:FindFirstChild("Shopik") -- it finds the gui called "Shopik" (You can change the gui name instead of Shopik)
	if Gui and Gui:IsA("ScreenGui") then -- it check if the gui exist "and Gui:IsA("ScreenGui")" is optional
		Gui.Enabled = true -- it makes the gui open
	end
end)

-- You have finished.

I would rather not to do. This function will fired when any part of the player’s character touches to part.
The reason I choose to use mine was making function fire just 1 time until player stops touching part.
And the reason you got error probably because of this part of code

since you can’t use players.LocalPlayer on a server script