generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Can ColorCorrection be locally enabled by touching a Part?

Previous Thread :: Next Thread 
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
01 Jul 2016 11:02 PM
I was a little curious on this topic in the past, and I was wondering if this was even possible.
Report Abuse
Im_Curious is not online. Im_Curious
Joined: 28 Jun 2016
Total Posts: 9
01 Jul 2016 11:29 PM
Yes, I would so say giving it has an "Enabled" property, but I am pretty new to the scripting scene.
Report Abuse
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
01 Jul 2016 11:48 PM
Same here! I was trying to look into it but I'm unsure how to pull something like this off without FE.
Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
01 Jul 2016 11:50 PM
I've been trying to make the script, but no luck so far.
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
01 Jul 2016 11:59 PM
With filteringenabled you would use the touched event in the server then fire a remoteevent on the client. In the client when that remoteevent is fired you would add a new colorcorrection into workspace.CurrentCamera.
Report Abuse
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
02 Jul 2016 12:02 AM
Same as well. Basically what I was looking for is something like this:

When you teleport to an alley way or somewhere dark, a dark bluish ColorCorrection would be applied. When you teleport somewhere else like a bedroom, the ColorCorrection wouldn't be enabled anymore. I can only accomplish this through FE, and currently I'm trying to work around that.
Report Abuse
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
02 Jul 2016 12:03 AM
Ah, I see. Truthfully as a "basic" scripter, I'm unsure if I can accomplish something like this. (That's why I was avoiding FE)
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
02 Jul 2016 12:08 AM
Ah, without FE you can just do it all client side.

Localscript:

local part = workspace.Part --Your part

part.Touched:connect(function(p)
if p.Parent:FindFirstChild("Humanoid") and game.Players:FindFirstChildp.Parent.Name) == game.Players.LocalPlayer then
local cc = Instance.new("ColorCorrectionThingy", workspace.CurrentCamera) --whatever it's called
cc.Saturation = 10 --set all the stuff
end
end)
Report Abuse
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
02 Jul 2016 12:24 AM
Oh, thank you so much! I'll give this a go
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
02 Jul 2016 12:26 AM
You might have to give that code a once-over cause there are errors in it, but that's the general gist.
Report Abuse
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
02 Jul 2016 12:35 AM
Ah hm, It didn't quite work but I'll explain the steps I did.


Went into Workspace, inserted a LocalScript, and used the example you gave me above. Then going back into "Camera" from Workspace, I inserted a ColorCorrection effect, made some adjustments to the saturation (adjusted the script as well to match with the settings of the CC) and tested it. However, I noticed that the script underlined a part of the script with that red squiggle, it was in this line:

if p.Parent:FindFirstChild("Humanoid") and game.Players:FindFirstChildp.Parent.Name) == game.Players.LocalPlayer then


It seems like right at the game.Players:FindFirstChildp.Parent.Name)
part might have a sight error? I believe the error was on my part though.
Report Abuse
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
02 Jul 2016 12:36 AM
Oh, and currently there's only one part in the workspace named "Part" as well
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
02 Jul 2016 12:44 AM
This should be a localscript in StarterGui or anywhere else that's replicated on the client.


local part = workspace.Part
part.Touched:connect(function(p)
if p.Parent:FindFirstChild("Humanoid") and game.Players:FindFirstChild(p.Parent.Name) == game.Players.LocalPlayer then
local cc = Instance.new("ColorCorrectionEffect", workspace.CurrentCamera)
cc.Saturation = 0 --set this stuff
end
end)
Report Abuse
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
02 Jul 2016 12:59 AM
Alright, I corrected the location of the LocalScript and moved into StarterGui. I also tried out the corrected version of your script example, and tested out, going into play mode and touching the part (Part). Anything else I would have to do? I wonder if I'm skipping a step.
Report Abuse
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
02 Jul 2016 01:01 AM
Oh wait a minute, it works! Thank you so much!
Report Abuse
xCrystalGem is not online. xCrystalGem
Joined: 08 Jan 2016
Total Posts: 220
02 Jul 2016 01:02 AM
Now, is it possible for the CC to be un-enabled when stepping off of the part?
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
02 Jul 2016 01:20 AM
add this in to the same script at the bottom:

part.TouchEnded:connect(function(p)
if p.Parent:FindFirstChild("Humanoid") and game.Players:FindFirstChild(p.Parent.Name) == game.Players.LocalPlayer then
workspace.CurrentCamera.ColorCorrectionEffect:Destroy()
end
end)
Report Abuse
Zeloi is not online. Zeloi
Joined: 27 Sep 2010
Total Posts: 1143
02 Jul 2016 01:21 AM
IF FE is enabled and you locally enable or disable it, you will only see the difference and it will not affect the other clients.

However, if you told the server to change it(via remoteEvents or functionEvents), all clients would see this change
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image