Police Database Return Values

MY ISSUE HAS BEEN RESOLVED
Issue was, I needed to convert the bools to strings.

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?

Hello, my game has a large basis on Emergency Service. For Law Enforcement teams, they are given a Mobile Data Computer tool which can run tags, impound vehicles, view calls for service, and run individual players which will populate the player’s values.

  1. What is the issue? Include screenshots / videos if possible!

Each Player starts with values which can change in game, such as “Wanted” or “Fishing License” etc. These should populate on the Mobile Data Computer so the Law Enforcement Officer can tell if the player is wanted, suspended, has a fishing license, etc. Everything is working except the return of a searched Player. None of the text values seem to changing, and I know it’s something in my script, but I’m lost on where to go now to address my issue.

  1. What solutions have you tried so far?

Here is my LocalScript under the “RunPlayerButton”

local MDT = script:FindFirstAncestorOfClass("ScreenGui").Main
local DBFrame = MDT.DatabaseFrame
local PlrReturnFrame = MDT.PlrReturnFrame
local RunPlrBtn = MDT.DatabaseFrame.RunPlayerBtn
local searchBar = script.Parent.Parent.EnterPlrName
local items = script.Parent.Parent.Parent.PlrReturnFrame
local WarrantButton = PlrReturnFrame.WarrantButton
local WarrantReason = PlrReturnFrame.WarrantReason
local DefaulTagButtonText = RunPlrBtn.Text

RunPlrBtn.MouseButton1Click:Connect(function()
	local foundPlr
	local plr = searchBar.Text
	print(plr)
	for _, players in next, game.Players:GetChildren() do
		if string.lower(players.Name) == string.lower(plr) then
			foundPlr = plr
			break
		end
	end
	

	if foundPlr then
		PlrReturnFrame.Visible = true
		DBFrame.Visible = false

		PlrReturnFrame.FishingStatusReturn.Text = foundPlr.Fishing.Value
		PlrReturnFrame.PlayerNameReturn.Text = foundPlr.Name
		PlrReturnFrame.PlayerWantedReturn.Text = foundPlr.Wanted.Value
		PlrReturnFrame.LicenseStatusReturn.Text = foundPlr.Wanted.Value
	else
		coroutine.wrap(function()
			RunPlrBtn.Text = "Player Not Found!"
			wait(2)
			RunPlrBtn.Text = DefaulTagButtonText
		end)()
	end
end)

Now here is the Server Script in the PlrReturnFrame:

FishingTxt = script.Parent.FishingStatusReturn
PlrText = script.Parent.PlayerNameReturn
ValidTxt = script.Parent.ValidReturn
WantedTxt = script.Parent.PlayerWantedReturn
DLStatusText = script.Parent.LicenseStatusReturn
RunPlrBtn = script.Parent.Parent.DatabaseFrame.RunPlayerBtn
PlrName = script.Parent.Parent.DatabaseFrame.EnterPlrName

function search()
	plr = game:GetService("Players"):GetChildren()
	name = plr.Name
	found = false
	for i=1,#name do
		if name[i].Value:lower() == PlrName.Text then
			found = true
		end
	end
	if not found then
		RunPlrBtn.Txt = "Player not found"
	else
		RunPlrBtn.Text = "Player found"
	end
end

script.Parent.Text.Changed:connect(search)

Keep in mind, it detects if the player is found and will pull up the PlayerReturnFrame, and it also detects if the Player isn’t found. It’s just the text isn’t changing. It has to be something simple, because I have the TagReturnFrame scripted very similar. I’ve always had issues with scripting Player searching scripts.

Here is how it appears after a found Player is ran in the MDT.

Here is how it looks when a found vehicle Tag is ran (Works perfectly, using attributes for values in the tag script):

Here is also a look at the explorer:

I know it should be a simple fix, if anyone has any ideas, please let me know. I’m scratching my head on the best route to resolve this. Thank you guys/gals so much in advanced! :slight_smile: