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

Look at Sun+Lights glare effect; Where did I go wrong?

Asked by
Xetrax 85
10 years ago

I have been modifying... well, completely redesigning a script I found that caused a screen glare when the Player looked up at the sun, I'm aiming for it to do that for anything that has a light the player looks at (as long as the light is enabled; for spotlights if they are pointed at the player), I had been doing alright with this script for awhile, but I'm beginning to think this is a little larger than I can handle, plus I've run into an annoying block... the Color(s) stopped calculating correctly, and... well, if you copy the code below and paste it in a Localscript with all the variables accounted for, you'll see what I mean...

01repeat wait() until game.Players.LocalPlayer.Character --[ Giving Time If A Player Handling Script Needs To Run Beforehand. ]
02 
03local GroupS = game:GetService("GroupService")  --[ I like to get all the services just in case I'll need them later... ]
04local WorkS = game:GetService('Workspace')
05local People = game:GetService('Players')
06local Lights = game:GetService('Lighting')
07local SG = game:GetService('StarterGui')
08local TeamS = game:GetService('Teams')
09 
10--[Constants]:
11local HUD = script.Parent   --[ Simple screen GUI. ]
12local HudScrn = HUD:FindFirstChild("ViewMain")  --[ Frame called "ViewMain". ]
13local Flash = HudScrn:FindFirstChild("Glare")   --[ Another frame called... Oh can't you guess... ]
14local Cam = WorkS.CurrentCamera
15local SunClr = Color3.new(1, 1, 1)
View all 86 lines...

Please Help if you can! (And yes, I do like to enclose my comments in *Brackets *[])

0
If the way I comment bothers you, I'll edit this so all the comments are in the preferred style... Xetrax 85 — 10y

Answer this question