Help with glossy coding

Need help with scripting Ive been trying to make a script to basically add reflection on a avatar like Club Stellar ❄️ Club Stellar - Roblox But sadly i cant get it no where glossy enough like club stellar heres the code

local function applyGlossyEffect(character)
	local glossyMaterials = {
		Enum.Material.SmoothPlastic,
		Enum.Material.Neon,
		Enum.Material.Metal,
		Enum.Material.Marble,
		Enum.Material.Ice,
		Enum.Material.Plastic,
		Enum.Material.Sand,
		Enum.Material.Glacier,
		-- Add more materials here...
	}

	local reflectanceValue = 1.0 -- Maximum reflectance value for a high gloss effect

	for _, part in pairs(character:GetDescendants()) do
		if part:IsA("BasePart") then
			local randomMaterial = glossyMaterials[math.random(1, #glossyMaterials)]
			part.Material = randomMaterial
			part.Reflectance = reflectanceValue
			part.Color = Color3.fromRGB(255, 255, 255) -- Adjust the color as needed
		end
	end
end

local function applyGlossyToPlayer(player)
	local character = player.Character
	if character then
		applyGlossyEffect(character)
	end
end

-- Apply glossy effect to all existing players
for _, player in pairs(game.Players:GetPlayers()) do
	applyGlossyToPlayer(player)
end

-- Apply glossy effect to any players added in the future
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		applyGlossyEffect(character)
	end)
	applyGlossyToPlayer(player)
end)

Which isnt making it glossy like this?


1 Like

I don’t know about what ths glossy is or how you do the effect but you should know, If this is something to do with reflectance then you might want to try to also change lighting (brightness, bloom, etc…) (As well as something like pointlights near player character or something)

Just hypothesis…