I'm trying to make a tool that confuses players In an area when clicked, except for the person who clicked it. I dont know what to use.
local tool = script.Parent tool.Equipped:connect(function(mouse) end)
I have this so far, but I think It's incorrect.
You are correct so far; what you want to do next is connect to the Button1Down event:
local tool = script.Parent tool.Equipped:connect(function(mouse) mouse.Button1Down:connect(function() end) end)
For making other players walk away, iterate through each other player in the game and call Humanoid:MoveTo to tell them to walk:
local tool = script.Parent local player=game.Players.LocalPlayer local radius=30 local t=player.Character:WaitForChild("Torso") tool.Equipped:connect(function(mouse) mouse.Button1Down:connect(function() for _,v in pairs(game.Players:GetPlayers())do if v~=player and v.Character then local char=v.Character if char:FindFirsrtChild("Torso")and char:FindFirstChild("Humanoid")then local torso,h=char.Torso,char.Humanoid if(torso.Position-t.Position).magnitude<=radius then h:MoveTo(torso.Position+CFrame.new(t.Position, torso.Position).lookVector*radius,t) end end end end end) end)