Islands is not a valid member of Players "Players"

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?

A working island unlock system.

  1. What is the issue?

The issue is it keeps giving an error!

  1. What solutions have you tried so far?

Finding a solution!

game.Players.PlayerAdded:Connect(function(player)
	
	local Islands = Instance.new("Folder", player)
	Islands.Name = "Islands"
	
	local CandyIsland = Instance.new("BoolValue", Islands)
	CandyIsland.Name = "CandyIsland"
	CandyIsland.Value = false
	
end)

local p = game:GetService("Players")
game.Workspace.CandyIslandLock.Touched:Connect(function()
	p.Islands.CandyIsland.Value = true
	game.StarterGui.IslandUnlocked.TextLabel.Visible = true
	game.StarterGui.IslandUnlocked.TextLabel.Text = "Candy Island Unlocked"
	wait(3)
	game.StarterGui.IslandUnlocked.TextLabel.Visible = false
end)

Thank you in advance!

You parented the Islands folder to EACH player that joins. However in the next section:

You are indexing for Islands in the Players service, not the players themselves.

What trodex said above. You are getting the players index from the playerservice, but you must retrieve the value to set the BoolValue inside them. (ignore the other reply, I misunderstood the use of the PlayersService for a second)

@Prototrode's post is the solution. Just adding on, in the touched connection add a hit parameter to your function then use the hit variable (it’s set to the part that got hit) to get the character, then use the character to get the player.

Edit:
Here is an example:

local Players = game:GetService("Players")
game.Workspace.CandyIslandLock.Touched:Connect(function(hit)
	local hit.Parent = character
	--... get player etc.
	player.Islands.CandyIsland.Value = true
	game.StarterGui.IslandUnlocked.TextLabel.Visible = true
	game.StarterGui.IslandUnlocked.TextLabel.Text = "Candy Island Unlocked"
	wait(3)
	game.StarterGui.IslandUnlocked.TextLabel.Visible = false
end)

Set the code up so that the players character is retrieved when they touch the CandyIslandLock, and from this you can get the actual player whom contains the BoolValue that you are wanting to change. (And then set the value)

Would it be like this?

game.Workspace.CandyIslandLock.Touched:Connect(function(h)
	if h.Parent:FindFirstChild("Humanoid") then
		local player = h.Parent:GetPlayerFromCharacter("Player")
		player.Islands.CandyIsland.Value = true
		game.StarterGui.IslandUnlocked.TextLabel.Visible = true
		game.StarterGui.IslandUnlocked.TextLabel.Text = "Candy Island Unlocked"
		wait(3)
		game.StarterGui.IslandUnlocked.TextLabel.Visible = false
	end
end)

I believe this line

local player = h.Parent:GetPlayerFromCharacter("Player")

Would instead be


local player = game.Players:GetPlayerFromCharacter(h.Parent)

But the rest seems good to me, try testing it

local players = game:GetService("Players")
local candyPart = workspace:WaitForChild("CandyIslandLock")

players.PlayerAdded:Connect(function(player)
	local Islands = Instance.new("Folder")
	Islands.Name = "Islands"
	Islands.Parent = player

	local CandyIsland = Instance.new("BoolValue")
	CandyIsland.Name = "CandyIsland"
	CandyIsland.Value = false
	CandyIsland.Parent = Islands
end)

candyPart.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("HumanoidRootPart") then
		local player = players:GetPlayerFromCharacter(hit.Parent)
		if player then
			player.Islands.CandyIsland.Value = true
			local playerGui = player.PlayerGui
			local islandUnlocked = playerGui.IslandUnlocked
			local candyLabel = islandUnlocked.TextLabel
			candyLabel.Visible = true
			candyLabel.Text = "Candy Island Unlocked!"
			task.wait(5)
			candyLabel.Visible = false
		end
	end
end)