How do you make the choices players made remembered in the script?
Like, if the game asks you: are you a boy, or a girl?
For example, if you click girl, your choice will be remembered and it will give you a different dressing game than that of the boys. It will also be remembered by the NPCs who will refer to you as "she" or "he".
I'm just wondering about this. Your help will be appreciated.
Set up a blank variable, then modify it accordingly. Following your example, here's a button which saves your gender as a variable:
local GUI = script.Parent -- Assuming the script is inside the GUI local GirlButton = script.Parent.GirlButton -- Assuming your button is named as so local BoyButton = script.Parent.BoyButton -- Assuming your button is named as so local ChosenGender -- Your empty variable GirlButton.MouseButton1Click:Connect(function() ChosenGender = GirlButton.Name end BoyButton.MouseButton1Click:Connect(function() ChosenGender = BoyButton.Name end
You can then manipulate the stored ChosenGender variable as you please.
If you wish to use your ChosenGender variable in other scripts, you should use StringValues instead.