generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Scripters with XBOX ONE scripting knowledge

Previous Thread :: Next Thread 
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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 is not online. 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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
14 Jul 2016 03:49 PM
first reply, lol


r+://393244197r+://393244224r+://393244262
Report Abuse
LeNightFury is not online. LeNightFury
Joined: 23 Mar 2014
Total Posts: 1292
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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
14 Jul 2016 03:59 PM
GPE?


Star Wars Fans: https://www.roblox.com/games/345312845/-
Report Abuse
LeNightFury is not online. LeNightFury
Joined: 23 Mar 2014
Total Posts: 1292
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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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
LeNightFury is not online. LeNightFury
Joined: 23 Mar 2014
Total Posts: 1292
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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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
LeNightFury is not online. LeNightFury
Joined: 23 Mar 2014
Total Posts: 1292
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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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
LeNightFury is not online. LeNightFury
Joined: 23 Mar 2014
Total Posts: 1292
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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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 is not online. 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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
14 Jul 2016 04:18 PM
Yes but remember this is for Xbox...


Star Wars Fans: https://www.roblox.com/games/345312845/-
Report Abuse
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
14 Jul 2016 06:00 PM
bump


Star Wars Fans: https://www.roblox.com/games/345312845/-
Report Abuse
InsidersNetwork1001 is not online. InsidersNetwork1001
Joined: 25 Nov 2013
Total Posts: 1875
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
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
14 Jul 2016 06:08 PM
You are right, they did. Case resolved..


Star Wars Fans: https://www.roblox.com/games/345312845/-
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image