Need help with a character picker script

Ok so this is a edit of the post i made its about a character picker script i want to make but i dont really know how to do that i have 5 characters i need to make a script that when you click a pick button shown down turn is into taken for everyone else after that noone else cant select the character and it gives the character to you (changes ur StarterCharacter) if you can help i thanks in advance here are the scripts and the other parts also hope its more clear now:
script service script

local AlanPicked = ReplicatedStorage:WaitForChild("AlanPicked")
local Charchanged = ReplicatedStorage:WaitForChild("CharacterPicked")
local alanv = script.Alan
local player = game.Players.PlayerAdded
local Alantakentext = player.PlayerGui.CharacterPicker.ChoseCharacter.AlanPick.AlanTaken
AlanPicked.OnServerEvent:Connect(function(player, Alantakentext)
	Alantakentext.Visible = true
	alanv.Value = true

local button script
```local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AlanPicked = ReplicatedStorage:WaitForChild("AlanPicked")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local StarterPlayer = game:GetService("StarterPlayer")
local Charchanged = game

local Alanatakentext = script.Parent.Parent.AlanPick.AlanTaken
local plr = game.Players.LocalPlayer
local alan = ReplicatedFirst.Humans.Alan.StarterCharacter


	if Alanatakentext.Visible == true then
		script.Parent.Parent.Visible = false
[Uploading: image.png...]()

If you are referring to the text not going invisible or changing when the remote event fires, then the problem is your Alantakentext variable. You are referencing StarterGui, which does not reflect the changes made to gui objects when a player is playing the game.

When a player joins the game, everything inside StarterGui is cloned and then parented to the Player’s PlayerGui. If you wanna make changes to a player’s gui objects during runtime, you’ll have to reference the player gui instead. For example in your case, you would be better off doing:
player.PlayerGui.CharacterPicker.ChoseCharacter.AlanPick.AlanTaken.Visible = true instead of what you currently have. Let me know if this works or not, and if I misunderstood your problem because it was pretty broad and kind of hard to understand.

thanks that helped for a part of the script thanks for telling me you dont undersant what i mean im going to edit it so its more understandable