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
it might be because you're clicking on someones's accessories
No, I clicked right in the middle of my torso
Does it display the SlectionBox?
No, It also does not print "maked"
(Part.Parent) might be the issue, since there is no Part defined. :D
No, the part exist.
No, that's not the point Part by itself isn't defined. Line: 6:: game.Players:GetPlayerFromCharacter(Part.Parent)
OK i fixed it, BUT IT STILL DOES NOT WORK
Any output in the console?
SIR, please give a VALID and PROPER answer. I do not want to repost this again and have no answers.