Issue on displaying the names of maps in a GUI

Hi everyone, i have a problem from my GUI not displaying the names of the map in the vote session

Like in the Image:

everything is working fine on the script, but only the names of maps are not displaying. Any help will be appreciated.

code (one of the choices):

local player = game:GetService("Players").LocalPlayer
local voted = player:WaitForChild("voted")
local rep = game:GetService("ReplicatedStorage")
local votere = rep:WaitForChild("RemoteEvent"):WaitForChild("Vote")
local variables = rep:WaitForChild("Variables")
local boolean = rep:WaitForChild("Booleans"):WaitForChild("RevealVotes")
local choice = variables:WaitForChild("Choice2")
local votechoice = variables:WaitForChild("VoteChoice2")
local votescounter = script.Parent:FindFirstChild("Votes")
 
local map = choice.Value
    if choice.Value then
    script.Parent.Title.Text = map.Name
    end
choice:GetPropertyChangedSignal("Value"):Connect(function()
    local map = choice.Value
        if choice.Value then
        script.Parent.Title.Text = map.Name
        end
end)
1 Like

I’m having a hard time telling how your script is laid out, but I might have an idea of what’s wrong. Assuming the choice variable is a reference to an ObjectValue that points to another Value on the server, your script isn’t working because the client can’t see some server-side items. You need to move the maps into ReplicatedStorage so the player can see them (but be warned, scripts and such in ReplicatedStorage can be seen and downloaded by exploiters).

Using a lot of ValueObjects like this is rarely the best strategy. You’re much better off using a RemoteEvent and firing all clients with a table containing all the relevant info.

1 Like

Well, I have all my maps on ServerStorage, but I didn’t want to move them anywhere else as it could cause lag on weaker devices

1 Like

That’s fine, in that case you’ll have to adjust the way your system works so the client can actually see the information.

1 Like

I made a system, where, before the voting starts, the maps are transferred to the workspace, and after that it is sent back to ServerStorage, where when the voting ends, only the “winning” map will be removed and taken to the workspace, thus making the map names to be displayed on the GUI the way I wanted. Thanks for helping me.

I’m having same issue on my topic about my voting system, the difference between mine I’m using viewport frames to preview map the problem is I couldn’t get replicate models that parented to server storage to clients any alternatives with my problems without using images or moving these on replicated storage?

No, if you want the client to see it, you have to put it in a place where it’ll be replicated. That’s just how it works.

I’ll try to clone the model on server side but don’t parent it on any yet, then on client side parent it where you want it to put, I think it’ll works.

-- Server
 Map = ServerStorage.Model:Clone()
 RemoteEvent:FireAllClients(Map)
-- Client
function Retrieve(Map)
 Map.Parent = game.Workspace
end
RemoteEvent.OnClientEvent:Connect(Retrieve)