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: Help! Why isn't this TweenGui working?? Please help me

Previous Thread :: Next Thread 
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 09:20 PM
So I have made a script where if you press e, it should tween up your gui and back down when you press it again, but it's not working. Why isn't it working?

Can you help me fix it...
-------------------------------------------------------
wait()
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
local frame = gui.GarageControls
gui = script.Parent
local blur = Instance.new("BlurEffect", workspace.CurrentCamera)
blur.Enabled = false
Open = false

toggle = false

function PressE(key)
if (key =="e") then
if (Open == false) then
Open = true
blur.Enabled = true
if toggle == false then
################################, 'Out', 'Bounce', 1)
toggle = true

elseif (Open == true) then
Open = false
blur.Enabled = false
frame:TweenPosition(UDim2.new(0,80,0,250), 'Out', 'Bounce', 1)
toggle = false
end
end

end
end
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 09:21 PM
yhtgerw
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 09:24 PM
ytrerw
Report Abuse
ColdBrewHolder is not online. ColdBrewHolder
Joined: 19 Feb 2017
Total Posts: 1002
05 Jul 2017 09:27 PM
friend me bubbly.
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 10:01 PM
j75h64g3rfeq

help
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 10:04 PM
6yh5tg4rfewe
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 10:41 PM
fcyvbhknj
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 10:44 PM
ojihub
Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
05 Jul 2017 10:45 PM
.. Are you connecting the function?


~ S P I C Y ~
Report Abuse
platin_m is not online. platin_m
Joined: 25 Jul 2016
Total Posts: 169
05 Jul 2017 10:48 PM
^
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 11:04 PM
how do i connect it
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 11:15 PM
h64g3rfe
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 11:30 PM
htgerwfe
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
05 Jul 2017 11:51 PM
kyjrtehrgwef
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
06 Jul 2017 12:57 AM
nrbe
Report Abuse
brennisawesome is not online. brennisawesome
Joined: 26 Oct 2012
Total Posts: 1658
06 Jul 2017 01:32 AM
--conditions:Connect(functionName)
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
06 Jul 2017 07:56 AM
And where do I put that??
Report Abuse
Knucklesskjf_GT is not online. Knucklesskjf_GT
Joined: 28 Aug 2016
Total Posts: 210
06 Jul 2017 08:16 AM
VERY VERY VERY IMPORTANT NOTE : This type of button pressing scripts need to be "Local Scripts" And they need to be inside StarterPlayerScripts or StarterCharacterScripts, Also that will require from you to re-define the variables like gui = script.Parent because the gui is not the script's parent anymore after changing it's location.


Here is the script :

----------------------------------------------------------
wait()
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
local frame = gui.GarageControls
gui = script.Parent
local blur = Instance.new("BlurEffect", workspace.CurrentCamera)
blur.Enabled = false
Open = false

toggle = false

function PressE()
if (Open == false) then
Open = true
blur.Enabled = true
if toggle == false then
################################, 'Out', 'Bounce', 1)
toggle = true
elseif (Open == true) then
Open = false
blur.Enabled = false
frame:TweenPosition(UDim2.new(0,80,0,250), 'Out', 'Bounce', 1)
toggle = false
end
end
end

game:GetService("ContextActionService"):BindAction("PressingE", PressE, true, "e")
----------------------------------------------------------
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
06 Jul 2017 10:52 AM
Ok so now where do I put the gui at? Do I put it at StarterPlayerScripts? And do I keep the script inside GuiMain?
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
06 Jul 2017 11:00 AM
its not working
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
06 Jul 2017 12:02 PM
u6jy5ht4grfeq
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
06 Jul 2017 07:22 PM
help
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
06 Jul 2017 07:40 PM
yctuyuij
Report Abuse
Knucklesskjf_GT is not online. Knucklesskjf_GT
Joined: 28 Aug 2016
Total Posts: 210
07 Jul 2017 08:33 AM
Keep the Gui in StarterGui, but change the script into a Local Script and put it in StarterPlayerScripts or StarterCharacterScripts.
Report Abuse
mrbobbilly is not online. mrbobbilly
Joined: 27 Feb 2010
Total Posts: 8142
07 Jul 2017 09:20 AM
it didnt work though
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