Making this script work locally?

Hello everyone, i have this script to make a decal change when i click on a part. My question is how could i make it so the change is only visible for the person who clicks the part. As of right now, the decal change applies to all players. This is the script.

local ClickDetector = script.Parent.ClickDetector
local activated = false

ClickDetector.MouseClick:Connect(function()
	if activated == false then
		activated = true
		Decal.Texture = "http://www.roblox.com/asset/?id=10452776679"
		Decal.Face = "Left"
		print("change 1")

	else
		Decal.Texture = "http://www.roblox.com/asset/?id=8027723078"
		Decal.Face = "Left"
		activated = false
		print("change 2")
	end
end)

Thanks to anyone that replies!

You can just copy and paste this into a local script and should be good to go! (In StarterPlayerScripts or StarterGUI)

1 Like

Make the script into a localscript and place it somewhere that localscripts can run in, such as StarterPlayerScripts

1 Like