i want to make game like cheese escape someone help pls
COMMUNITY QUESTION
how to make part that if person clicked it part is only invisible to person who clicked it?
2 answers
Use local scripts. Local scripts make things happen only to the client (you). This is an example when you click a ClickDetector.
ClickDetector.MouseClick:Connect(function(Player)
Part.Transparency = 1
end)
This should work. Otherwise it could either be you did it wrong or it’s another error from a different script that’s causing it not to work.
2 comments
0
I don't think click detectors work on the client
0
or maybe it does, wait let me check
Ok so use a local script and put something similar to this (make sure to put it in startercharacterscripts)
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local part = game.Workspace.Cheese -- Set this to whatever your part is
mouse.Button1Down:Connect(function()
if mouse.Target == part then
--You can do whatever you want here just using transparency as an example
if part.Transparency ~= 1 then -- just making sure the code doesn't unnecessarily run more than once
part.Transparency = 0.5
end
end
end)
You could swap out using mouse for using raycasts if you want Hope this helps!
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Use local scripts. Easy!
i tried
I think i see your problem, if your using clickdetectors it doesn't work on the client, let me write a response to make a better way
ok i solved it cuz i used local script in workspace XD