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

Help with this script?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I am making a script so when you walk inside a building it removes the fog (which I have completed) but the only issue is that it turn the fog off for everyone on the server. So I tried making it with LocalScript's and they did not work. Is there any other way to make this work. Also here are the scripts and everthing is placed in the workspace and the scripts are insde a part.

The off script:

function off()
game.Lighting.FogEnd = 100000
end
script.Parent.Touched:connect(off)

The on script:

function on()
game.Lighting.FogEnd = 200
end
script.Parent.TouchEnded:connect(on)

3 answers

Log in to vote
2
Answered by 9 years ago

Unless you're using FilteringEnabled, I don't think there's a way to make this only work for one player.

0
To do it without filtering would require each client to repeatedly set the properties of lighting in a RenderStepped loop, like BlueTaslem (i think?) demonstrated in his local lighting hack some years ago. 1waffle1 2908 — 9y
Ad
Log in to vote
0
Answered by
qwrn12 85
9 years ago

you should make it so it triggers your player try this

player=game.Players.LocalPlayer
0
ceep it on localscript qwrn12 85 — 9y
0
This will not affect the outcome of the script in any way. Programmix 285 — 9y
Log in to vote
0
Answered by 9 years ago
function off()
game.Lighting.FogEnd = 100000-- Fog End makes it to a point where you cannot see your screen
-- The best way  to handle what you want is to make a GUI and cover your whole screen and the gui could be destroyed or remain
end
script.Parent.Touched:connect(off) --


function on()
game.Lighting.FogEnd = 200--  right here could be your starting
end
script.Parent.TouchEnded:connect(on)


0
This isn't a valid answer. Programmix 285 — 9y
0
what is defined as a valid answer? That's opinionated.. scottmike0 40 — 9y
0
Also https://scriptinghelpers.org/help/how-post-good-questions-answers -- my answer is the exact definition under the further explanation of rules, you simply like downvoting me dont you.. scottmike0 40 — 9y
0
A valid answer for me atleast is another way to make it so when going into a house the fog turns off. Is there any other way I could do this with out making it so I have to walk on a brick? CallMeDonaldTrump 5 — 9y
View all comments (6 more)
0
Also so it does not effect every client. CallMeDonaldTrump 5 — 9y
0
that is difficult to say, because the only thing that can affect if 1 user can see something is through local parts http://wiki.roblox.com/index.php/Local_parts which is told on this site. Soo, you can always create your own fog and not rely on the lightning to do it for you scottmike0 40 — 9y
0
It just looks soo bad with the GUI CallMeDonaldTrump 5 — 9y
0
well, because you cannot force lightning to be a local part, and you refuse to use local part then it is not possible at this time in roblox scottmike0 40 — 9y
0
@scottmike0 What I mean by "That isn't a valid answer." is "it doesn't answer the question at all" Programmix 285 — 9y
0
It does, I clearly stated it in green, sorry if you are color blind, I am unable to fix that. scottmike0 40 — 9y

Answer this question