Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to make this script only apply to the player who touched the part?

Asked by 6 years ago
Edited 6 years ago

I'm trying to make it so when you go inside an area it turns off bloom so you can actually read the dialog that is said. Although when I tested it out, it applied to all players. I'm not sure if this is helpful but my game does have filteringenabled on.

script.Parent.Touched:connect(function(part)
    local humanoid = part.Parent:FindFirstChild("Humanoid") 
    if (humanoid ~= nil) then
        game.Lighting.Bloom.Enabled = false
    end
end)

script.Parent.TouchEnded:connect(function(h)
    local humanoid = h.Parent:FindFirstChild("Humanoid") 
    if (humanoid ~= nil) then
        game.Lighting.Bloom.Enabled = true
    end
end)

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Oops, just noticed that you said FilteringEnabled was active, I'm assuming that you're enabling Bloom via a script and not a Local Script. So...

All changes made on a Script will replicate to all players. If you use a Local Script this is not the case, so try using a Local Script to enable/disable bloom client-side.

If you need to convert the rest of your place to be Filtering Enabled compatible look at this tutorial.

wiki.roblox.com/index.php?title=Converting_Experimental_Mode_Games

0
Updated my answer btw ALANstar360 45 — 6y
0
I'm not exactly sure what to do as the local script won't work. TheDevProgram 2 — 6y
Ad
Log in to vote
0
Answered by
Ap_inity 112
6 years ago

You can use a localscript or use game.Players.LocalPlayer.
If your problem persists, please leave a comment.

0
It doesn't work with a localscript, but could you provide an example of where to put 'game.Players.LocalPlayer'? TheDevProgram 2 — 6y

Answer this question