Text label only changing once

So i’m trying to make a “Manual Check-In” for my airline. This allows one person to easily check-in people and give them their tickets. So what i’ve got working is that it selects the player (as seen in the video below) but it only works once and not more.

Localscript:

MainFrame.SelectionButton.MouseButton1Click:Connect(function()
	if MainFrame.SelectTxt.Text == "Select" then
		MainFrame.SelectTxt.TextColor3 = Color3.fromRGB(255, 175, 62)
		MainFrame.SelectTxt.Text = "Selecting"
		for i,v in pairs(game.Players:GetPlayers()) do
			if v.Name ~= plr.Name then
				v.Character.MCI.Transparency = 0.5
				v.Character.MCI.CP.ClickDetector.MaxActivationDistance = 32
			end
		end
	else
		MainFrame.SelectTxt.TextColor3 = Color3.fromRGB(81, 109, 39)
		MainFrame.SelectTxt.Text = "Select"
		MainFrame.PlayerName.Text = "Unknown"
		for i,v in pairs(game.Players:GetPlayers()) do
			if v.Name ~= plr.Name then
				v.Character.MCI.Transparency = 1
				v.Character.MCI.CP.ClickDetector.MaxActivationDistance = 0
			end
		end
	end
end)

game.ReplicatedStorage.MCI.Remotes.Fix.OnClientEvent:Connect(function()
	for i,v in pairs(game.Players:GetPlayers()) do
		v.Character.MCI.Transparency = 1
		v.Character.MCI.CP.ClickDetector.MaxActivationDistance = 0
	end
end)

Playeradded script:

game.Players.PlayerAdded:Connect(function(plr)
	wait(2)
	local cloneSetup = game.ReplicatedStorage.MCI.Model.MCI:Clone()
	local weld = Instance.new("WeldConstraint")
	weld.Parent = plr.Character
	weld.Part0 = cloneSetup
	weld.Part1 = weld.Parent.HumanoidRootPart
	
	cloneSetup.Position = plr.Character.HumanoidRootPart.Position
	cloneSetup.Orientation = Vector3.new(plr.Character.HumanoidRootPart.Orientation.X, plr.Character.HumanoidRootPart.Orientation.Z -90, plr.Character.HumanoidRootPart.Orientation.Y)
	cloneSetup.CP.Position = plr.Character.HumanoidRootPart.Position
	cloneSetup.CP.Orientation = Vector3.new(plr.Character.HumanoidRootPart.Orientation.X, plr.Character.HumanoidRootPart.Orientation.Z -90, plr.Character.HumanoidRootPart.Orientation.Y)
	cloneSetup.Parent = plr.Character
end)

Script in the box around each player:

script.Parent.MouseClick:Connect(function(plr)
	game.ReplicatedStorage.MCI.Remotes.Fix:FireClient(plr)
	local MainFrame = plr.PlayerGui.MciUi.MainFrame
	MainFrame.PlayerName.Text = script.Parent.Parent.Parent.Parent.Name
	MainFrame.SelectTxt.TextColor3 = Color3.fromRGB(109, 51, 51)
	MainFrame.SelectTxt.Text = "Unselect"
end)

^^ Here is where it doesn’t change the text the second time but fires the event to the client.

Replicated Storage:
image

Please tell me if you need any other information to help me fix this issue. Thank you :slight_smile:

1 Like

?
image

Thanks. I updated it to my issue again.

The thing is that I would use the remote I have in the box script to change the ui’s name in the local script but I can’t seem to get the name of the player passed through the remote. That’s why i’m changing the players ui on the server.

Boost, Still need help with this.

Not exactly sure if this helps your issue, but maybe your problem has something to do with this?

game.ReplicatedStorage.MCI.Remotes.Fix.OnClientEvent:Connect(function()
	for i,v in pairs(game.Players:GetPlayers()) do
		v.Character.MCI.Transparency = 1
		v.Character.MCI.CP.ClickDetector.MaxActivationDistance = 0
	end
end)

In this loop, you don’t do the if v.Name ~= plr.Name then check. This may or may not be disabling the character’s input detection

Try adding a print to the OnClientEvent at the very start to see if it’s firing just once or every time?