Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is the .InputEnded event exclusive to local scripts?

Asked by
Necrorave 560 Moderation Voter
8 years ago

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.

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. Shawnyg 4330 — 8y
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. Necrorave 560 — 8y
0
Yeah.. Well, sometimes on some events, they might mention if it's local script exclusive. SOMETIMES. Shawnyg 4330 — 8y
0
So, if you can help. What are similar methods I could use to recreate `.InputEnded` or `.FocusLost` in a regular script? Necrorave 560 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

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!!

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. Necrorave 560 — 8y
0
No problem man. UserOnly20Characters 890 — 8y
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! Necrorave 560 — 8y
Ad

Answer this question