Problem
Hey, I have a problem with a script for my GUI. I’m making a board that links it via numbers, I have 2 tracks in studio, 1.1 and 1.2. I type in 1.4, it says it’s wrong so that’s right, only it scans 2x and I can’t figure out the problem.
Script
local Boards = game.Workspace.Boards:GetChildren()
local BoardSign = script.Parent.Parent.Number
local Cover = script.Parent.Parent.Parent.Parent.Management.Cover
script.Parent.MouseButton1Click:Connect(function()
for i,v in pairs(Boards) do
if v.SurfaceGui.TextLabel.Text == BoardSign.Text then
script.Parent.Text = "Searching..."
wait(2)
script.Parent.Text = "Success"
Cover.Visible = false
BoardSign.Text = ""
wait(2)
script.Parent.Text = "Search"
else
script.Parent.Text = "Searching..."
wait(2)
script.Parent.Text = "Failed"
Cover.Visible = true
BoardSign.Text = ""
wait(2)
script.Parent.Text = "Search"
end
end
end)
Video