Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

2 comments

0

Updated my answer btw

0

I'm not exactly sure what to do as the local script won't work.

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

1 comment

0

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

This discussion is preserved as it was. New answers, comments, and votes are closed.