Hello, i'm trying to make a tool that when i click somewhere it does something but i want it to not do that thing when the parent of the mouse target is in the restricted table the thing is how it is now, i can still click on the restricted.
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local restricted = {"model1","randommodel","etc","stuff"}
mouse.Button1Down:Connect(function ()
for i,v in pairs(restricted) do
if mouse.Target.Parent.Name ~= v then
--some thing..
end
end
end)
