Local script inside player gui.
local player = game.Players.LocalPlayer playerMouse = player:GetMouse() while true do wait() if playerMouse.Target ~= nil then if playerMouse.Target == "BoxOne" then print("BoxOne is awesome") end end wait() end
You can use pcall
to detect if you are able to get a UserId from the name, as it will error if there is no user with the given name:
local NameTaken = pcall(function() return game.Players:GetUserIdFromNameAsync("Name here") end) if not NameTaken then print("name free") end