I made a select tool. I need this for a ban tool that im gonna use in a training game. Can somebody answer with VALID and PROPER answers? There are no errors, It just does not work. I tried this on myself and it also does not work. Both of these scripts are in a tool.

Normal script:

local SelectMake = script.Parent:WaitForChild("SelectMake")
	
SelectMake.OnServerEvent:Connect(function(_, Part1, Mode)
	if Mode == 1 then
		local hum = Part1.Parent:FindFirstChild("Humanoid")
		local plr = game.Players:GetPlayerFromCharacter(Part.Parent)
		if hum then
			if plr then
				local Selector = Instance.new("SelectionBox", Part1.Parent.HumanoidRootPart)
				Selector.Adornee = Part1.Parent.HumanoidRootPart
				Selector.Name = "Selector"
				print("Maked")
			end
		end
	elseif Mode == 2 then
		local Selector = Part1:FindFirstChild("Selector")
		local hum = Part1.Parent:FindFirstChild("Humanoid")
		local plr = game.Players:GetPlayerFromCharacter(Part1.Parent)
		if hum then
			if plr then
				local Selector = Part1.Parent.HumanoidRootPart.Selector
				Selector:Destroy()
			end
		end
	end
end)

Local script:

local Tool = script.Parent
local Debris = game:GetService("Debris")
local SelectMake = script.Parent:WaitForChild("SelectMake")
local LastSelection = nil

Tool.Equipped:Connect(function(Mouse)
	Mouse.Button1Down:Connect(function()
		if LastSelection then SelectMake:FireServer(LastSelection,2) end
		if Mouse.Target and Mouse.Target.Parent then
			SelectMake:FireServer(Mouse.Target,1)
			local LastSelection = Mouse.Target
		end
	end)
end)

10 comments

0

it might be because you're clicking on someones's accessories

0

No, I clicked right in the middle of my torso

0

Does it display the SlectionBox?

0

No, It also does not print "maked"

0

(Part.Parent) might be the issue, since there is no Part defined. :D

0

No, the part exist.

0

No, that's not the point Part by itself isn't defined. Line: 6:: game.Players:GetPlayerFromCharacter(Part.Parent)

0

OK i fixed it, BUT IT STILL DOES NOT WORK

0

Any output in the console?

0

SIR, please give a VALID and PROPER answer. I do not want to repost this again and have no answers.