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:
Please tell me if you need any other information to help me fix this issue. Thank you