✓ Accepted answer
Something is touching the part immediately, causing Touched to fire.
You are not checking if it's an actual body part of a player's character. So it could be the baseplate touching it, and firing it immediately.
Simply check that it's a player touching it.
local Players, Workspace = game:GetService("Players"), game:GetService("Workspace");
script.Parent.Touched:Connect(function(part)
local client = Players:GetPlayerFromCharacter(part.Parent);
if (client) then
Workspace.ExposureCompensation = 2;
end
end);
If a player touched it, set ExposureCompensation to 2.
(is that a property now? i havent been on studio for 5 months straight)
Side note
In the gif you provided, you did not indent your code. Even if it's just one line, always indent your code. It makes code more readable, and makes it easier for debugging.
Hopefully this answered your question, and if it did, then don't forget to hit that "Accept Answer" button below this answer. If you have any other questions, do leave them in the comments below.
1 comment
Exposure = 0