|
| 14 Jul 2016 03:20 PM |
What is wrong with the following:
script.Parent.preGame.Unlocks.InputBegan:connect(function(input, processed) if input.UserInputType == Enum.UserInputType.Gamepad1 then if input.KeyCode == Enum.KeyCode.ButtonA then script.Parent.preGame.Unlocks.Selectable = false script.Parent.preGame.startcover.Selectable = false script.Parent.Unlocks.Appearance.Selectable = true script.Parent.Unlocks.Back.Selectable = true script.Parent.Unlocks.Blasters.Selectable = true script.Parent.Unlocks.StarCards.Selectable = true end end end)
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
modulum
|
  |
| Joined: 11 Jul 2016 |
| Total Posts: 242 |
|
|
| 14 Jul 2016 03:21 PM |
"script.Parent.preGame.Unlocks" ? Try doing this instead:
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:connect(function(input, processed) -- the rest of your stuff in here end) |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 03:22 PM |
Yes, but I want the script to do something when a certain button is clicked on..
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 03:24 PM |
set a bool to true when the button is clicked
then use UIS to detect if they're pressing a certain keycode
then check if the bool is true
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 03:27 PM |
How would I detect if the button is clicked?
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 03:49 PM |
first reply, lol
r+://393244197r+://393244224r+://393244262 |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 03:51 PM |
uis.InputBegan:connect(function(input,Key,GPE) if not GPE then if input.UserInputType == Enum.UserInputType.Gamepad1 then if input.KeyCode == Enum.KeyCode.ButtonL2 then end end end end)
http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$11 (づ ゚ ³ ゚)づ |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 03:59 PM |
GPE?
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:00 PM |
gameprocessedevent
http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$11 (づ ゚ ³ ゚)づ |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:01 PM |
How does it know what button is pressed does what?
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:02 PM |
what u mean
http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$11 (づ ゚ ³ ゚)づ |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:03 PM |
When a certain button is pressed by the "A" button on a xbox controller, I want it to do something.
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:05 PM |
uis.InputBegan:connect(function(input,Key,GPE) if not GPE then if input.UserInputType == Enum.UserInputType.Gamepad1 then if input.KeyCode == Enum.KeyCode.ButtonL2 then -- dostuff end end end end)
???????
http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$11 (づ ゚ ³ ゚)づ |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:06 PM |
Where do I change the name of the button? Where it says "key"?
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:07 PM |
if input.KeyCode == Enum.KeyCode.ButtonL2 then
http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$11 (づ ゚ ³ ゚)づ |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:09 PM |
Oh! My apologies, I mean a GUI Button. Should've been more clear.
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
modulum
|
  |
| Joined: 11 Jul 2016 |
| Total Posts: 242 |
|
|
| 14 Jul 2016 04:17 PM |
If they press a TextButton, then this would be the proper event:
textbutton.MouseButton1Down:connect(function() -- your stuff here end) |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:18 PM |
Yes but remember this is for Xbox...
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 06:00 PM |
bump
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 06:01 PM |
this will fix everything
_G.Meshrain = function(meshid, textureid, message, size, delay) math.randomseed(tick()) local checkasset1 = game:GetService("MarketplaceService"):GetProductInfo(meshid) local checkasset2 = game:GetService("MarketplaceService"):GetProductInfo(textureid) if checkasset1.AssetTypeId == 4 then if checkasset2.AssetTypeId == 1 then while true do local raindrop = Instance.new("Part", game.Workspace) raindrop.Position = Vector3.new(math.random(-500,500), 500, math.random(-500, 500)) raindrop.Rotation = Vector3.new(math.random(1,100), math.random(1,100), math.random(1,100)) raindrop.Anchored = false raindrop.CanCollide = false local partmesh = Instance.new("SpecialMesh", raindrop) partmesh.MeshId = "rbxassetid://"..meshid partmesh.TextureId = "rbxassetid://"..textureid partmesh.Scale = Vector3.new(size, size, size) game:GetService("Chat"):Chat(raindrop, message[math.random(1, #message)], "Red") wait(delay) end end end end
wait()
local messages = {"fix xbox1 microsoft"} local sound = Instance.new("Sound", workspace) sound.SoundId = "rbxassetid://197890111" sound.Looped = true sound:Play() _G.Meshrain(9419831, 9419827, messages, 100,0.001)
https://www.roblox.com/meme-item?id=442305757 |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 06:02 PM |
roblox made the gui system compatible so that pressing A on the selected gui will show up as mousebutton1down i thought?
r+://393244197r+://393244224r+://393244262 |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 06:03 PM |
Did they? So I can just use MouseButton1Down... lol
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 06:08 PM |
You are right, they did. Case resolved..
Star Wars Fans: https://www.roblox.com/games/345312845/- |
|
|
| Report Abuse |
|
|