when I click the baseplate, it just prints the name of the brick but won't print "ITS BASE" but when I click a non object(nil) it prints "LOL NAAA"..
player = game.Players.LocalPlayer mouse = player:GetMouse() mouse.Button1Down:connect(function(click) print(mouse.Target) if mouse.Target == "BasePlate" then print("ITS BASE!") elseif mouse.Target == nil then print("LOL NAAA") end end)
player = game.Players.LocalPlayer mouse = player:GetMouse() mouse.Button1Down:connect(function(click) print(mouse.Target) if mouse.Target and mouse.Target.Name == "BasePlate" then --Check if the name of the target is BasePlate print("ITS BASE!") elseif mouse.Target == nil then print("LOL NAAA") end end)
You forgot to check its name You were just checking if the object was a BasePlate.
player = game.Players.LocalPlayer mouse = player:GetMouse() mouse.Button1Down:connect(function(click) if mouse.Target~=nil then --Check to make sure it wont break if mouse.Target.Name == "BasePlate" then --Needs to check its name print("ITS BASE!") elseif mouse.Target == nil then print("LOL NAAA") end end end)