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

A little help with ColorCorrection?

Asked by 8 years ago

So.. Here's the issue I'm trying to resolve. My goal is, to have a player step on a Part in WorkSpace. When the Part (Named 'p') is stepped on, ColorCorrection hue/tint changes locally for that player. The script I got helped on with so far looks like this:

local p = script.Parent local c = game.Players.LocalPlayer.Character

p.Touched:Connect(function() local cc = Instance.new("ColorCorrection", c) game.Lighting.ColorCorrection.TintColor = Color3.fromRGB(121, 118, 172) end)

Yet, whenever I step on the Part named "p", nothing seems to change.

{I've seen a RPG game on roblox have several locations around the same map (same WorkSpace). Whenever someone teleports to that area of the map, the ColorCorrection changes LOCALLY for that player. One area is tinted more blue using ColorCorrection, while if you teleport to another location, that area is tinted more red. Any ideas?}

0
Well simply put, you're putting the Correction into the character, then referencing its parent as Lighting. That isn't right itsJooJoo 195 — 8y
0
So, would the parent be "Player"? xCrystalGem 0 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago
wait(.3)
local Player = game.Players.LocalPlayer
repeat wait(.1) until Player.Character
local c = Player.Character
local p = workspace:WaitForChild("p")


local Camera = workspace.CurrentCamera
local cc = Instance.new("ColorCorrection", Camera)


p.Touched:connect(function(hit)
if hit.Parent.Name ~= c.Name then return end
cc.TintColor = Color3.fromRGB(121, 118, 172)
end)

Place this code inside a localscript, and then place the localscript inside "Character" when the player spawn, or inside PlayerGui/Backpack

0
Tried this, but still no luck.. So here's what I have now: I have a Part in WorkSpace named "p". No scripts or anything like that is in it, it's just a part. Then, in Camera, I have a script that contains the scripting to get a CurrentCamera, and within that script I have a LocalScript. I put the script written above in it, and inserted "ColorCorrection" effect into the normal script. Going into xCrystalGem 0 — 8y
0
- Going into test/play solo mode, nothing seems to be happening when I walk over the "p" Part. xCrystalGem 0 — 8y
Ad
Log in to vote
0
Answered by 4 years ago

idk if this helps at this point but i found ColorCorrection doesn't like to work with Localscripts try a regular script

Answer this question