Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is the .InputEnded event exclusive to local scripts?

I have been fooling around with some GUI and I am having trouble with some of the events regarding Input.

Specifically, I am having trouble figuring out which events are exclusive to local scripts and which are not.

I was wondering if someone supply a link that shows you the events you cannot use outside a local script, this is extra though.

Example:

script.Parent.InputEnded:connect(function(this)
	if this then
		x = 1
	end
end)

Something like this would work in a client test, but not on a server.

Which leads me to believe that .InputEnded is specifically for local scripts, but I cannot find anything to verify.

4 comments

1

Woah, a whole list of events would be a bit tiresome.I do believe InputEnded is for LocalScripts. You can test it in Studio.

0

I figured it was too much to ask for haha. Although, I wish there was something on the API wiki that told me what events were local script exclusive.

0

Yeah.. Well, sometimes on some events, they might mention if it's local script exclusive. SOMETIMES.

0

So, if you can help. What are similar methods I could use to recreate .InputEnded or .FocusLost in a regular script?

1 answer

InputEnded also works for Regular script here for example:

game:GetService("UserInputService").InputEnded:connect(function(InputObject)
	if InputObject.KeyCode == Enum.KeyCode.Q then
		Print(InputObject)--Prints Q
	end
end)

GetService() method returns a service with the ClassName requested.

~UserOnly16Charcters, Hoped I helped you to answer your question! If you have any further question, don't hesitate to comment below!!

3 comments

0

Cannot test this at the moment, at work. Although, could you do me a favor and explain or provide a link for the :GetService() part of your script? I would really appreciate it.

0

No problem man.

0

Not sure if this is the answer I am looking for after reading the link. I will have to test when I get home, +1 for the help though!

This discussion is preserved as it was. New answers, comments, and votes are closed.