Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I get other peoples Data in a localscript?

Asked by 3 years ago

I tried invoking a specific player, but it didn't work If you need more information or more of the script please ask

Heres the LocalScript script

remotes.JpInfo.OnClientEvent:Connect(function(player)
    local yes, chances = remotes.GlobalJackpot:InvokeServer()
    local yesp = fr.Jackpot.Players
    local JackpotFrame = yesp:GetChildren()
    local playerb = game.Players:FindFirstChild(player.Name)

    local data = remotes.Jackpot:InvokeServer(playerb)
    local yes = game:GetService("ReplicatedFirst").PlayerName

    if not yesp:FindFirstChild(playerb.Name) then
        local Clone = yes:Clone()
        Clone.Parent = yesp
        Clone.Name = playerb.Name
        Clone.Player.Text = playerb.Name
        Clone.Added.Text = data.Added
    end

    local PlayerGui = game.Players.LocalPlayer.PlayerGui.MainGui.Frames.Jackpot.Players[playerb.Name]
    PlayerGui.Player.Text = playerb.Name
    PlayerGui.Added.Text = data.Added
end)

Heres how I get the data

Remotes.Jackpot.OnServerInvoke = function(player)
    local DataB = Data:get(player)
    return DataB
end
0
Assuming you're not using DataStoreService, what is "Data" defined as in your server script? BrimoireGrimoire 11 — 3y

Answer this question