I am currently trying to develop a roblox game, would somebody be able to help me with locating a module?

This is a module script, it is in ServerScriptService:

local PlayerDataHandler = {}

local dataTemplate = {
    Race = "",
    Cash = 0,
    Inventory = {},
    Level = 0,
}

local ProfileService = require(game.ServerScriptService.ProfileService)
local Players = game:GetService("Players")

local ProfileStore = ProfileService.GetProfileStore("PlayerProfile", dataTemplate)

local Profiles = {}

local function playerAdded(player)
    repeat wait() until player:GetAttribute("slot") ~= nil

    local slot = player:GetAttribute("slot")
    print("Loaded with slot", slot)

    local profile = ProfileStore:LoadProfileAsync(slot .. player.UserId)

    if profile then
        if profile.Error then
            warn("Failed to load profile for player", player.UserId, "- Error:", profile.Error)
            player:Kick()
            return
        end

        profile:Reconcile()

        profile:ListenToRelease(function()
            Profiles[player] = nil
            if player:IsDescendantOf(Players) then
                print("Profile released for player", player.UserId, "- Kicking player.")
                player:Kick()
            end
        end)

        if not player:IsDescendantOf(Players) then
            profile:Release()
        else
            Profiles[player] = profile
            print("Loaded profile for player", player.UserId)
            print(Profiles[player].Data)
        end
    else
        print("Failed to load profile for player", player.UserId)
        player:Kick()
    end
end

function PlayerDataHandler:Init()
    for _, player in ipairs(game.Players:GetPlayers()) do
        task.spawn(playerAdded, player)
    end

    game.Players.PlayerAdded:Connect(playerAdded)

    game.Players.PlayerRemoving:Connect(function(player)
        if Profiles[player] then
            Profiles[player]:Release()
        end
    end)
end

local function getProfile(player)
    assert(Profiles[player], string.format("Profile does not exist for %s", player.UserId))

    return Profiles[player]
end

function PlayerDataHandler:Get(player, key)
    local profile = getProfile(player)
    assert(profile.Data[key], string.format("Data does not exist for key: %s", key))

    return profile.Data[key]
end

function PlayerDataHandler:Set(player, key, value)
    local profile = getProfile(player)
    assert(profile.Data[key], string.format("Data does not exist for key: %s", key))

    assert(type(profile.Data[key]) == type(value))

    profile.Data[key] = value
end

function PlayerDataHandler:Update(player, key, callback)
    local profile = getProfile(player)

    local oldData = self:Get(player, key)
    local newData = callback(oldData)

    self:Set(player, key, newData)
end

return PlayerDataHandler

This script calls the module module script and no errors occur:

local PlayerDataHandler = require(game.ServerScriptService:WaitForChild("PlayerDataHandler"))

script.Parent.Touched:Connect(function(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    
    if player then 
        PlayerDataHandler:Update(player, "Cash", function(currentCash)
            return currentCash + 300
        end)
        
        PlayerDataHandler:Update(player, "Inventory", function(currentInventory)
            table.insert(currentInventory, "Bag")
            
            return currentInventory
        end)
        
        script.Parent:Destroy()
        
        print(PlayerDataHandler:Get(player, "Cash"))
        print(PlayerDataHandler:Get(player, "Inventory"))
    end
end)

This script is the one I have a problem with, it is in PlayerGUI and cannot locate the module script when I try to call it resulting in this error, Infinite yield possible on ‘StarterPlayer.StarterCharacterScripts:WaitForChild(“PlayerDataHandler”)’:
local TweenService = game:GetService(“TweenService”)

local tweenInfo = TweenInfo.new(
.1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out
)

local tween = TweenService:Create(script.Parent.Parent.Slot2, tweenInfo, {Position = UDim2.new(0.661, 0, 0.126, 0)})
local tween2 = TweenService:Create(script.Parent.Parent.Slot2, tweenInfo, {Position = UDim2.new(0.681, 0, 0.126, 0)})

local tween3 = TweenService:Create(script.Parent.Parent.Slot3, tweenInfo, {Position = UDim2.new(0.122, 0, 0.126, 0)})
local tween4 = TweenService:Create(script.Parent.Parent.Slot3, tweenInfo, {Position = UDim2.new(0.102, 0, 0.126, 0)})

local right = script.Parent[“>”]
local left = script.Parent[“<“]

local tween5 = TweenService:Create(left, tweenInfo, {Position = UDim2.new(1.162, 0, 0.442, 0)})
local tween6 = TweenService:Create(left, tweenInfo, {Position = UDim2.new(1.062, 0, 0.442, 0)})
local tween7 = TweenService:Create(right, tweenInfo, {Position = UDim2.new(-0.292, 0, 0.442, 0)})
local tween8 = TweenService:Create(right, tweenInfo, {Position = UDim2.new(-0.192, 0, 0.442, 0)})

local isMouseOver = false
local isButtonClicking = false

script.Parent.MouseEnter:Connect(function()
if not isMouseOver then
isMouseOver = true

    local n = 157
    local n2 = 180

    right.TextTransparency = 0
    left.TextTransparency = 0
    script.Parent.Sound:Play()
    tween2:Play()
    tween4:Play()
    tween6:Play()
    tween8:Play()
    repeat
        right.TextTransparency -= 0.1
        left.TextTransparency -= 0.1
        task.wait(0.01)
    until right.TextTransparency <= 0 and left.TextTransparency <= 0 or not isMouseOver
end

end)

script.Parent.MouseLeave:Connect(function()
if isMouseOver then
isMouseOver = false

    right.TextTransparency = 1
    left.TextTransparency = 1
    tween:Play()
    tween3:Play()
    tween5:Play()
    tween7:Play()
end

end)

script.Parent.MouseButton1Click:Connect(function()
script.Parent.Biwa:Play()
if not isButtonClicking then
isButtonClicking = true

    -- Fade out the current slots and title
    repeat
        script.Parent.Parent.SlotsTitle.TextTransparency += 0.2
        script.Parent.Parent.Slot1.TextTransparency += 0.2
        script.Parent.Parent.Slot2.TextTransparency += 0.2
        script.Parent.Parent.Slot3.TextTransparency += 0.2
        script.Parent.Parent.Slot1.BackgroundTransparency += 0.2
        script.Parent.Parent.Slot2.BackgroundTransparency += 0.2
        script.Parent.Parent.Slot3.BackgroundTransparency += 0.2
        script.Parent.Parent.Back.TextTransparency += 0.2
        task.wait(0.01)
    until script.Parent.Parent.SlotsTitle.TextTransparency >= 1

    -- Hide current UI elements
    script.Parent.Parent.Visible = false

    -- Load PlayerDataHandler module
    local PlayerDataHandler = require(game.StarterPlayer.StarterCharacterScripts:WaitForChild("PlayerDataHandler"))

    local player = game.Players.LocalPlayer
    local race = PlayerDataHandler:Get(player, "Race")

    if race ~= "" then
        print("Selection")
    else
        print("Not selected")
    end
end

end)

The first block of code is the actual module script, the second calls that script and works just fine, but the last has problems and causes an error. I suspect it has to do with them being server and client side scripts but I’m not sure how to fix that issue. Thank you in advance

New contributor

Sergei Ivlev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật