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

Changing FogDistance and Ambient for one player?

Asked by 9 years ago

Okay, so I've seen this effect used in a lot of games where you can toggle between fog on and fog off but it only effects your player. Or when you wear "night vision goggles" and it only changes your ambient. I would like to know how this works if anyone knows.(Maybe it has something to do with current camera but I can't find anything on the wiki...)

Thanks, ~Sweetpea11fir

3 answers

Log in to vote
1
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

Method 1

I had an epiphany one night about how to cause local lighting and implemented it the next morning.

If you use the Changed event on the Lighting service, a LocalScript can turn back the change caused by someone else, and so the LocalScript governs what the lighting looks like. (The effect of this is a psychedelic strobe on the Server side -- but none of the clients see this)

That led to the various local-lighting APIs that are floating around; it's pretty easy to implement yourself.

(This method is not a good one, but it means you don't have to do anything to your place to make it work)


Method 2

Use workspace's FilteringEnabled. This property, when enabled, makes any change caused by a LocalScript to be ignored by the server -- so just modify the lighting with LocalScripts, and those modifications are local to that one client.

However, this can also mess-up scripts that weren't designed with FilteringEnabled intended (since the server then ignores everything a LocalScript does). Currently ROBLOX recommends all places use FilteringEnabled, though, so that should just be some necessary work.

Ad
Log in to vote
-2
Answered by 9 years ago

Take this model here: http://www.roblox.com/Localized-Lighting-item?id=103185990 You must be familiar with scripting to use this effectively. Read the comments made in the script to help you.

Log in to vote
-3
Answered by
Subbix -5
9 years ago

More detail remember this is a helping centre not a give away a random script centre.

0
Wow. Okay. I wasn't asking for the script, idiot, I was asking how one would do it. ObscureEntity 294 — 9y
0
It's the same thing. I'm not kidding... Subbix -5 — 9y

Answer this question