recently iv been trying to make a round system which shows the map image of the current map using a remote event from my modular script that fires the maps name and if visibility should be true or not i fire it to all clients it works the first time and after that it does not become visible but it fires visible and passes on like it did the job iv had tried many methods it will ither not load the image or it will fully be invisible. heres the code:
local player = game.Players.LocalPlayer
local Rep = game:GetService("ReplicatedStorage")
local StatusSet = Rep.Events.Remote.RE_StatusImage
local BoarderMapFrame = player.PlayerGui:WaitForChild("ComputerGui").RoundStatus:WaitForChild("BorderMapFrame")
local Map = BoarderMapFrame.MapFrame
local MapImages = Rep.MapImages
StatusSet.OnClientEvent:Connect(function(ChosenMapID, Visibility)
print("Fired Image Change")
print(Visibility)
print(ChosenMapID)
if Visibility == true then
task.wait(0.1)
BoarderMapFrame.Visible = true
else
BoarderMapFrame.Visible = false
end
for i,v in pairs(Rep.MapImages:GetChildren()) do
if v.Name == ChosenMapID then
Map.Image = v.Image
print(v)
end
end
end)
local status = Rep.Status
local statusUI = player.PlayerGui.ComputerGui.RoundStatus.StatusFrame.RoundStatus
status.Changed:Connect(function(value)
print("Fired Text Change")
statusUI.Text = value
end)
Firstly, can you please format your code correctly? It looks really messy at the moment. Secondly, can you record a video and telling us the problem using proper words? Sorry for sounding rude but I can’t really understand the problem here.
So the problem is, the script, on first time, shows the client the selected map frame, and the second time the script does thes ame thing, fails to show the map frame? Is that the problem?
Sorry for the late reply, but can you check if the MapFrame still exist when the game selects a second map in the second intermission? Check if it still exists and check the Visible property.
the issue was fixed by just moving one out of the other and then setting them as locals every time a new round started now for some reason it doesnt get deleted and icons load i still dont know whats the bug but at least it works