generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Won't detect mouse click?

Previous Thread :: Next Thread 
RobloxChampion1118 is not online. RobloxChampion1118
Joined: 20 Jan 2015
Total Posts: 16
15 Oct 2017 02:33 AM
Im trying to make it so when i click on ######## ## ##### to the ground but it won't do anything when i click on it and i get no error messages??? I've got this: local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.Button1Down:connect(function() if Mouse.Target ~= nil and Mouse.Target.Name == 'Block1' then Mouse.Target.Anchored = false end end)
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
15 Oct 2017 03:11 AM
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.Button1Down:connect(function()
local targ = mouse.Target
if targ then
if targ.Name == "Block1" then
targ.Anchored = false
end
end
end)
Report Abuse
RobloxChampion1118 is not online. RobloxChampion1118
Joined: 20 Jan 2015
Total Posts: 16
17 Oct 2017 07:24 AM
doesn't work :/
Report Abuse
RomDino is not online. RomDino
Joined: 04 Jul 2015
Total Posts: 2795
17 Oct 2017 07:25 AM
It does work. You just need to know how to use it.
Report Abuse
BlueFluffyNinja is not online. BlueFluffyNinja
Joined: 25 Aug 2016
Total Posts: 768
17 Oct 2017 09:26 AM
your part must have a clickdetector in it and the script must have button1click used correcly.

Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
18 Oct 2017 12:59 AM
Blue, my script doesn't require a ClickDetector, it's detecting using Mouse.Target
Report Abuse
BlueFluffyNinja is not online. BlueFluffyNinja
Joined: 25 Aug 2016
Total Posts: 768
18 Oct 2017 01:45 AM
just use a clickdetector its much easier then what you are doing.

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image