Touched event of cloned part error

Hi, I wanted to make a part that is only to client sided, because of values would be overlapping every player in the game. When touched will give the player one point and shouldn’t give the other players a point.

Problem is if I have to make it client sided, I have the part inside of ReplicatedStorage.
Plus, I also have to make the player get a point when it’s touched.
Whilst doing that and running the local script (it’s a local script inside of StarterGui), the cloned part goes into Workspace, but it will give me an error saying Partq is not a valid member of Workspace “Workspace” (Partq is the part - which resets the players points - is cloned)

local ResetPPasdasd = game.ReplicatedStorage.Partq
local debounce = false
local bruh = ResetPPasdasd:Clone().Parent
local CPvalue = 2
bruh = game.Workspace

bruh.Partq.Touched:Connect(function(t)
	if debounce == false then
		debounce = true
		bruh.CanTouch = false
		if CPvalue == 2 then
			print("no player point block touched, revert")
			wait(1)
			debounce = false
			bruh.Partq.CanTouch = true
		elseif CPvalue ~= 2 then
			CPvalue = 2
			print(CPvalue)
			PP1.CanTouch = true
			PP2.CanTouch = true
			wait(1)
			debounce = false
			bruh.Partq.CanTouch = true
		end
	end
end)

Any help would be really appreciated!

You reset the bruh variable after setting the CPvalue variable. Not sure what youre trying to do.

Instead of

local bruh = ResetPPasdasd:Clone().Parent
local CPvalue = 2
bruh = game.Workspace

DO:

local bruh = ResetPPasdasd:Clone()
bruh.Parent = workspace

And then change the touched event to this

bruh.Touched

Lots of errors

there are several errors

local ResetPPasdasd = game.ReplicatedStorage.Partq
local debounce = false
local bruh = ResetPPasdasd:Clone()
local CPvalue = 2
bruh.Parent = game.Workspace

bruh.Touched:Connect(function(t)
	if debounce == false then
		debounce = true
		bruh.CanTouch = false
		if CPvalue == 2 then
			print("no player point block touched, revert")
			wait(1)
			debounce = false
			bruh.CanTouch = true
		else
			print(CPvalue)
			CPvalue = 2
			PP1.CanTouch = true
			PP2.CanTouch = true
			wait(1)
			debounce = false
			bruh.CanTouch = true
		end
	end
end)

This is because I only took the parts where there were errors.

Thank you very much for the simple editing on

local bruh = ResetPPasdasd:Clone()
bruh.Parent = game.Workspace

Sometimes I can be dumb with simple fixes lol

This one too helped me (even though it’s the same solution lol)

local rs = game:GetService("ReplicatedStorage")
local partQ = rs:WaitForChild("Partq")
local bruh = partQ:Clone()
bruh.Parent = workspace
local CPvalue = 2
local debounce = false
local PP1 = nil --define this
local PP2 = nil --define this

bruh.Touched:Connect(function(t)
	if not debounce then
		debounce = true
		bruh.CanTouch = false
		if CPvalue == 2 then
			task.wait(1)
			debounce = false
			bruh.CanTouch = true
		elseif CPvalue ~= 2 then
			CPvalue = 2
			PP1.CanTouch = true
			PP2.CanTouch = true
			task.wait(1)
			debounce = false
			bruh.CanTouch = true
		end
	end
end)