|
| 31 Jan 2017 01:55 PM |
I see that a GuiObject has a set of standard Touch Screen events, such as TouchLongPress, TouchSwipe, TouchPinch, etc.
However, I'm not sure these events are actually functional... At least in the way I am using them.
I put this code in a LocalScript that is the child of a Imageless ImageLabel:
script.Parent.TouchSwipe:connect(function() script.Parent.BackgroundColor3 = Color3.new(0,0,0) wait(1) script.Parent.BackgroundColor3 = Color3.new(255,255,255) end)
This simply changes the color of the GUI to black and then white when I swipe the GUI to tell me that the event fired.
However, when I tested this on my mobile phone, I got no feedback, no color change, no event, no nothing. I believe I'm swiping correctly - and the color change function itself does work, but it won't activate on TouchSwipe
|
|
|
| Report Abuse |
|
|
JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
|
| 31 Jan 2017 02:02 PM |
script.Parent.TouchSwipe:connect(function() script.Parent.BackgroundColor3 = Color3.new(0/255,0/255,0/255) wait(1) script.Parent.BackgroundColor3 = Color3.new(255/255,255/255,255/255) end) |
|
|
| Report Abuse |
|
|
|
| 31 Jan 2017 02:19 PM |
Still doesn't work- Even though you have put the correct code in for changing color, it wouldn't have changed the fact that it would have gone from black to white.
I really think that this is a nonfunctional event.
|
|
|
| Report Abuse |
|
|
JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
|
| 31 Jan 2017 02:21 PM |
Oh, I just misread your question. I'm guessing it's deprecated? http://wiki.roblox.com/index.php?title=TouchSwipe |
|
|
| Report Abuse |
|
|
Wrathsong
|
  |
| Joined: 05 Jul 2012 |
| Total Posts: 22393 |
|
|
| 31 Jan 2017 02:21 PM |
I've only ever used TouchTap which works fine
Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx |
|
|
| Report Abuse |
|
|
Wrathsong
|
  |
| Joined: 05 Jul 2012 |
| Total Posts: 22393 |
|
|
| 31 Jan 2017 02:22 PM |
@josh; http://wiki.roblox.com/index.php?title=API:Class/UserInputService/TouchSwipe
No, the wiki search is being weird AGAIN.
Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx |
|
|
| Report Abuse |
|
|
JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
| |
|
|
| 31 Jan 2017 02:32 PM |
so does anyone know if this is legitimately broken?
|
|
|
| Report Abuse |
|
|
Wrathsong
|
  |
| Joined: 05 Jul 2012 |
| Total Posts: 22393 |
|
|
| 31 Jan 2017 02:33 PM |
I highly doubt it's broken.
Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Jan 2017 03:05 PM |
| Maybe your doing it wrong, I wouldn't know... I've never used this... |
|
|
| Report Abuse |
|
|
|
| 31 Jan 2017 04:06 PM |
@Wrathsong
I'm trying TouchTap in a similar manner but am getting no results:
script.Parent.TouchTap:connect(function() script.Parent.BackgroundColor3 = Color3.new(0/255,0/255,0/255) wait(1) script.Parent.BackgroundColor3 = Color3.new(255/255,255/255,255/255) end)
How did you do it?
|
|
|
| Report Abuse |
|
|
Wrathsong
|
  |
| Joined: 05 Jul 2012 |
| Total Posts: 22393 |
|
|
| 31 Jan 2017 04:28 PM |
| Well, I've never used TouchTap on a gui element because MouseButton1Click works for ####### ## ##### devices too. Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx |
|
|
| Report Abuse |
|
|