Hi, I made a script so that when a player touches a part the lighting changes but all players can see it and I only want the player who touched it can see it, I have tried changing it with a local script but it doesn’t work. Can someone tell me how to do it please? Thanks.
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
wait(.05)
game.Lighting.Ambient = Color3.fromRGB(255, 255, 255)
game.Lighting.Brightness = 0.15
game.Lighting.ExposureCompensation = 1.25
end
end)
script.Parent.TouchEnded:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
wait(.05)
game.Lighting.Ambient = Color3.fromRGB(70, 70, 70)
game.Lighting.Brightness = 0
game.Lighting.ExposureCompensation = 0
end
end)