I made a Gui so that you can choose what graphics quality that game should have. You have the choice between low quality or high quality. Once chosen between Yes (Ja) or No (Nein), another Gui comes to confirm the selection. If yes is pressed, then the answer is saved as a bool value and you are teleported in the game. The answer is used to adapt the game (if you have chosen high graphics then the game will also have more details and will be harder to load if you have chosen the opposite then the game will have fewer details, but less powerful device can make it easier play) However, if I try it and teleport it, the bool is always false, even if it was true before. How can I solve it?
Here is the Code:
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local Ja = script.Parent.JaKiste
local Nein = script.Parent.NeinKiste
local Time = Instance.new("IntValue",Players.LocalPlayer)
Time.Name = "Time"
Time.Value = 8
local placeId = 3503989334
local Bool = game.Players.LocalPlayer:WaitForChild("Bool")
local GrafikTitel = script.Parent.Parent.GrafikTitel
local teleportData = {
Option1 = game.Players.LocalPlayer.HochGrafik_Ok.Value,
Option2 = game.Players.LocalPlayer.NiedrigGrafik_Ok.Value
}
Ja.MouseButton1Click:Connect(function()
TeleportService:TeleportToSpawnByName(placeId, ("Teleport Anfang Spawn"),player, teleportData)
end)
Nein.MouseButton1Click:Connect(function()
if Bool.Value == true then
local Background2 = script.Parent
local HochGrafik = script.Parent.Parent.HochGrafik
local NiedrigGrafik = script.Parent.Parent.NiedrigGrafik
Background2:TweenPosition(UDim2.new(0.5, 0,1.2, 0),"Out","Bounce", 5, true)
NiedrigGrafik:TweenPosition(UDim2.new(0.75, 0,0.45, 0),"In","Back", 3, true)
HochGrafik:TweenPosition(UDim2.new(0.25, 0,0.45, 0),"In","Back", 3, true)
GrafikTitel:TweenPosition(UDim2.new(0.5, 0,0.1, 0),Enum.EasingDirection.In, Enum.EasingStyle.Bounce, 3, true)
wait(5)
for _,v in pairs(game.Players.LocalPlayer:GetChildren()) do
if v:IsA("BoolValue")then
v.Value = false
end
end
Bool.Value = false
end
end)
Thank you for taking the time to explain it to me and for writing the solution ^-^

1 comment
are the author 0 Answered by Eternalove_fan32 65 4 minutes ago Thank you for your answer, but it's not the question. Let's say I'm the player and have a strong computer. I'll then click on "High Graphics". If I click it, then the Bool Value of High Graphics goes to the LocalPlayer true. This allows the other game to know how to load it. To make sure that the high graphic is its Bool Value true,