How do I change color correction when you touch a block?

I am new to scripting and I really want to do this anyway how can I touch and in what script would this go to? The block or some script service Idk?


Do you want to make a block change color on touch?

1 Like

Wait! I meant color correction not the block changing color!

Make a Script under the part you wish to execute the script on. I’ve created a simple script that can change the color of a block but you can change the second line to your own code. You’d want to use the .Touched event.

script.Parent.BrickColor ="Black")

Can you be more specific as to what you wish to change?

I’d recommend looking at these:

Basically, TweenService smoothly changes certain properties

It can be really useful when you want to make smooth transitions, such as this:


And the Touched event will fire whenever the Part gets touched:


Well I mean as if it was the skybox but I am not sure how to change that and if I cant I resorted to using color correction which gives a hue idk how to explain it further from there.

To create this effect, you could change multiple attributes of the Part such as the Transparency, Color, Reflectance, Material, Size, etc?

Okay so maybe the skybox is the right way because I need the player to touch this block then a function or something like that changes the area skybox when you touch it and when you get out it should revert back into normal. I saw this in a game and I want to replicate it.

Oh, now I understand what you mean. Would you like it to change for the whole server or just the player who touches the part?

Just the player because other players may be in a different place :wink: :

Alright. So, firstly create a Sky under Lighting if you haven’t done so already and ensure it’s named “Sky”. Next, insert a LocalScript under the part with the following code, make sure to insert your textureIDs where it says to do so.

local sky = game.Lighting:WaitForChild("Sky")
sky.SkyboxBk = "TEXTUREID HERE"
sky.SkyboxDn = "TEXTUREID HERE"
sky.SkyboxFt = "TEXTUREID HERE"
sky.SkyboxLf = "TEXTUREID HERE"
sky.SkyboxRt = "TEXTUREID HERE"
sky.SkyboxUp = "TEXTUREID HERE"

If this doesn’t work, I’m quite unsure how to achieve what you wish to achieve.

local colorCorrection ="ColorCorrectionEffect")
colorCorrection.Parent = game.Lighting

local touchPart = workspace.**YOUR PART NAME HERE**

	if hit.Parent:FindFirstChild("Humanoid") == false then return end
	colorCorrection.TintColor = Color3.fromRGB(255, 0, 0)

This will turn the screen red when a player touches the touchPart.

Do I do this once again but touch ended to turn it back?

You would do

	if hit.Parent:FindFirstChild("Humanoid") == false then return end
	colorCorrection.TintColor = Color3.fromRGB(255, 255, 255)

It kinda flashes but I really need to learn script so I dont just take scripts