What is the parameter for the MouseButton1Click function?
MouseButton1Click:Connect(function(parameter)
end)
What is the parameter for the MouseButton1Click function?
MouseButton1Click:Connect(function(parameter)
end)
There is no parameter.
I coudlve sworn that there was a parameter for it, well uh thanks for the help, I think I was just using modules or something
For me, I usually do player
or hit
commonly, but player is what I always do when it comes to MouseButton1Click.
MouseButton1Click:Connect(function(player)
When it comes in clicking buttons as a part, I do:
script.Parent.ClickDetector.MouseClick:Connect(function(player)
yeah right now I have a module right now picking up mousebutton1clicks to the assigned whatever and like its returning nil
EDIT : Got it working I forgot that i have to use the parameter I assign to the actual function itself not the MouseButton1Click function.
function Checks:Click()
self.MouseButton1Click:Connect(function(self)
print(self)
end)
end
But this event just passes no arguments, you might be mixing two events.
@loveicicIe
What are you talking about?
self
here would reference the Checks
table so printing it within your function would just print the table Checks
or if overwritten from the parameter, nil
unless it’s a custom event you pass arguments from - printing nil doesn’t justify it working as intended at all.
mousebutton1click doesn’t returns any parameters/arguments
“mousebutton1click” does not return any parameters, although if you do want to define the player you can do so by making a parent chain.
script.Parent.Parent so on until you reach the player path. (As it is in playergui)