Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does it say Copy is not a valid member of ColorCorrectionEffect "Lighting.WaterPP.WaterCC"?

Script: https://pastebin.com/4GfuSvDu

Explorer: https://imgur.com/a/ltyh7L6

So I'm making a singleplayer game and I'm trying to detect if a player is in the selected area using a part with no collide, but when I enter the area it just says the error in the title, any help is appreciated!

2 answers

Because the script activates as soon as the game starts and doesn't find the part WaterDOF, you have to either make a wait() or find a way to actually wait into it detects WaterDOF

2 comments

0

i fixed it and you didnt read the thing properly, also i have a whole different problem now lol

0

it also runs the thing after the player touches the script and i verified that everything exists by looking at the explorer

Instead of using touched to detect if a player is in a box, use Region3 . Region3 allows you to detect whether a part is in a specific area or not. I'll show you some example code

local part = YourPartGoesHere
local region = Region3.new(part.Position - part.Size/2, part.Position + part.Size/2)

while wait(1) do
	local parts = game.Workspace:FindPartsInRegion3(region, part)

	for i, v in pairs(parts) do
		-- Use an if statement to detect whether it's a player or not.
		if v:IsDescandentOf(player.Character) then
			-- function here
		end
	end
end

This is just an example. Of course you'd have to call your functions and stuff yourself.

Cheers, Cynical

This discussion is preserved as it was. New answers, comments, and votes are closed.