I tried using a local script on a part and it doesn't work. This script was supposed to make a person hallucinate and only that person who was affected by it can see the entity.
local plr = game.Players.LocalPlayer
script.Parent.Touched:Connect(function()
if plr and debounce == false then
debounce = true
for i,v in pairs(workspace.Dummy:GetChildren())
if v.ClassName == "Part" then
v.Transparency = 0
end
end
end
end)
It never really show any errors. I'm not sure what's wrong with it.

4 comments
you can't use a local script with the touched function.
So do I use a fire client event?
no use a script
game.Players.PlayerAdded:Connect(function(plr) will substitute for local player in a script