My issue is that when I search for an object with numerical values in it’s name, the search returns every object with that number in it’s name.
The Object I am searching for is named “3Wedge” and the use case for this object is to be placed at the mouse position.
Here is a video:
Here is a screenshot of the objects in Replicated Storage with the same number in their names:
Here is how I am searching for the object:
Server-Sided Script:
BPRE = Instance.new("RemoteEvent")
BPRE.Name = "BloPlaRE"
BPRE.Parent = game.ReplicatedStorage
run = game:GetService("RunService")
BPRE.OnServerEvent:Connect(function(plr, label, cf)
for i, v in pairs(game.ReplicatedStorage.PartFolder:GetDescendants()) do
if v.Name == label then
print(label)
if v:IsA("Part") or v:IsA("MeshPart") then
BuildBlock = v:Clone()
BuildBlock.Transparency = 0
BuildBlock.Name = label
BuildBlock.Parent = game.Workspace.PlotBlocks
BuildBlock.CFrame = cf
BuildBlock.Anchored = true
BuildBlock.CanCollide = false
hb = BuildBlock:WaitForChild("HitBox")
hb.CFrame = BuildBlock.CFrame
hb.Anchored = true
hb.CanCollide = false
print(BuildBlock)
end
end
end
end)
The term “label” is referring the text property of the Gui Button, which in this case is “3Wedge” as shown in the video.
Again, the issue is that when I search for the object named “3Wedge” the search results return every object with the number 3 in it’s name.
Does anybody have a solution to this issue?