|
| 18 Feb 2016 04:15 PM |
workspace.Part.Touched:connect(function(hitpart) -- Part is to "hitpart" in this function
local tool = script.Parent tool.Equipped:connect(function(mouse) -- How is it possible to get mouse like this without
local mouse = Player:GetMouse() -- Doing this? |
|
|
| Report Abuse |
|
|
adzz123
|
  |
| Joined: 11 Jun 2011 |
| Total Posts: 260 |
|
|
| 18 Feb 2016 04:17 PM |
You can detect mouse button down and mouse button up mouse.Button1Down:connect(function()
There are 10 types of people in this world. Those that understand binary and those that don't. |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 04:21 PM |
| I know but why is it being obtained without a variable such as local mouse = player:GetMouse() |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 18 Feb 2016 04:25 PM |
| It's ROBLOX's default parameter for that function. |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 04:26 PM |
| is there a list of these? I kind of figured this but i dont see a list. |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 04:29 PM |
local mouse = game.Players.LocalPlayer:GetMouse()
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 04:32 PM |
| How do i know what parameters are relevant to which functions? is there a list? Is it always relevant to the event? |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 04:37 PM |
if i have an event and i do this
script.Parent.Touched:connect(function(player) -- Is this going to give me player or part? opposed to script.Parent.Touched:connect(function(part/hitpart) and what if i do script.Parent.Touched:connect(function(part,player) or script.Parent.Equipped:connect(function(mouse,player) -- will this mean i can just automatically use these arguments as a short cut to local player = game:GetService("Players").LocalPlayer local mouse = player:GetMouse Is it because the tool is already relevant to the player and mouse? |
|
|
| Report Abuse |
|
|
| |
|
Poine
|
  |
| Joined: 14 Aug 2011 |
| Total Posts: 391 |
|
|
| 18 Feb 2016 04:55 PM |
This video will teach you the difference between event mouse and normal mouse
https://www.youtube.com/watch?v=jUwju1F-YtY
|
|
|
| Report Abuse |
|
|