|
| 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
|
  |
| 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 |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 18 Oct 2017 01:45 AM |
just use a clickdetector its much easier then what you are doing.
|
|
|
| Report Abuse |
|
|