Hi all, how would I save the fact that an image is visible? I want to make a treasure hunt game for crystals, and I have this found GUI with these “Mystery” crystal images which act as placeholders for the crystal images which will appear when they get found (using region3).
Now, when a player “finds” a crystal by entering that crystals region3 area, I've got it so that the “Mystery” crystal image’s visibility to turn to false. Then the vacant space where the mystery image used to be to be is filled with the image of the crystal, by making the crystal image visible. I want this to save, so if the player leaves the game the "found" crystal images are all loaded in.
How do I edit my script to achieve this? Thanks.
--Found Script local FoundRegions = game.Workspace:WaitForChild("FoundRegions") local found = false while wait(1) do for i, v in pairs(FoundRegions:GetChildren()) do found = false local region = Region3.new (v.Position - (v.Size/2),v.Position + (v.Size/2)) local parts = game.Workspace:FindPartsInRegion3WithWhiteList(region, game.Players.LocalPlayer.Character:GetDescendants()) for _, part in pairs(parts) do --Loop one by one through part table if part:FindFirstAncestor(game.Players.LocalPlayer.Name) then --Print "Player was found" found = true break else found = false --Print "Player was not found in region" end end if found == true then --Make images visible if script.Parent.FoundClothing.Clothingframe.Scroll[v.Name].Visible == false then script.Parent.FoundClothing.Clothingframe.Scroll[v.Name].Visible = true local mystName = string.sub(v.Name, 1, (string.len(v.Name) - 5)) script.Parent.FoundClothing.Clothingframe.Scroll[mystName].Visible = false --Turns visible off for mystery break end end end end
Help is appreciated, thanks!