Need help with tables

i need help getting the values for the moods right now its printing nil

local Moods = require(game:GetService("ReplicatedStorage").Data:WaitForChild("ReturnMoods"))
local Player = game.Players.LocalPlayer
local MoodBar = script.Parent.MainFrame.FunMoodFrame.Bar
local MoodTitle = script.Parent.MainFrame.FunMoodFrame.Bar.TextLabel

local function DecreaseMoodBar(moodValue)
	if moodValue == nil then moodValue = 0 end

	local maxHeight = MoodBar.AbsoluteSize.X
	local targetHeight = maxHeight * (moodValue / 100) 

	local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local goal = {}
	goal.Size = UDim2.new(0, MoodBar.AbsoluteSize.Y, 0, targetHeight)

	local tween = game:GetService("TweenService"):Create(MoodBar, tweenInfo, goal)
	tween:Play()

	MoodTitle.Text = tostring(moodValue) .. "%"
end

local funMood = Moods.GetMood(Player, 'Fun')

DecreaseMoodBar(funMood)
print(funMood)

this is the local script that should be tweening the value and changing the text based on the mood value.

local module = {}
module.Profiles = {}

function module.UpdateMood(player, Mood)
	local profile = module.Profiles[player]
	if not profile then return end

	profile.Data.Moods.Fun += Mood
	player.Moods.Fun.Value = profile.Data.Moods.Fun
end

return module

this is the module that returns the value of the specified mood in the local script

local module = {
	
	Money = 0,
	
	Moods = {
		Fun = 100,
		Energy = 100,
		Hunger = 100,
		Hygiene = 100
	}
	
}
return module

use remoteevents

maximum characters

Please explain more i am new to profile service and do not know how to use it there does not seem to be a lot of tutorials for it either and do not send me one on “HOW TO USE PROFILE SERVICE :exploding_head:” because all of them do not explain how to actually use it and instead just show how to set it up

You are trying to access a value from your ProfileService data from the client which is impossible. In this case, use a one-way communication between the server and the client which is the RemoteEvent.