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 » Scripting Helpers
Home Search
 

Re: Tween Gui script problem...

Previous Thread :: Next Thread 
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 05:47 PM
I have made a script for a gui that when you press play, the Gui just moves up and out of the screen for the person, but it did not work. Also how do I make it so that the gui shows for every single person only once. So that when they die the Gui does not show again. Here is the script:

function onClicked()
game.StarterGui.ScreenGui.Frame:TweenPosition(UDim2.new(0, 0, 0, -600), "In", "Quint", 1)
wait(4)
end
script.Parent.MouseButton1Click:connect(onClicked)





Siggy CHANGE
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 05:49 PM
Help, anyone?



Siggy CHANGE
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 05:52 PM
Seriously, 7 people looked, and they bother not to help..



Siggy CHANGE
Report Abuse
IamAwesome777 is not online. IamAwesome777
Joined: 18 Jul 2011
Total Posts: 2640
02 Jan 2013 05:53 PM
There is a reason why nobody is helping.
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 05:54 PM
What may that reason be?



Siggy CHANGE
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 05:58 PM
Why would no one assist me in my time of need?



Siggy CHANGE
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
02 Jan 2013 05:59 PM
The reason is because it's not the player's gui that you are changing, it's in StarterGui.

~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 06:01 PM
So what? Do I change it to script.Parent? I really hate that.



Siggy CHANGE
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
02 Jan 2013 06:02 PM
Basically, just use this script that's edited off yours. Normally, I'd use anonymous functions... :PP But you know.

local gui = script.Parent.Parent -- I'm assuming the script is in Frame.
local frame = gui.Frame --If it isn't, then just fix the location. :PP

function onClicked()
frame:TweenPosition(UDim2.new(0, 0, 0, -600), "In", "Quint", 1)
wait(4)
end
script.Parent.MouseButton1Click:connect(onClicked)


~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 06:05 PM

The script is inside a T.extButton, that when you do click it, it activates the tween.


Siggy CHANGE
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 06:06 PM
Wait, with your version does it only show it once like if you die or reset it does not show again?



Siggy CHANGE
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
02 Jan 2013 06:07 PM
Oh, okay. I'll fix it, or try to.

local button = script.Parent
local frame = button.Parent

function onClicked()
frame:TweenPosition(UDim2.new(0, 0, 0, -600), "In", "Quint", 1)
wait(4)
end
button.MouseButton1Click:connect(onClicked)


And by the way, why do you have a wait(4) for? There's really no use for it.
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 06:09 PM
Lol, I seriously don't know. When I put in the script.Parent.Parent it worked but when I reseted it showed again.



Siggy CHANGE
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 06:11 PM
Wait it's like this: ScreenGui, Frame, TextButton. When the player clicks PLAY the Frame starts to tween up. I need help so that it only shows once for the player instead of each time when they die.



Siggy CHANGE
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
02 Jan 2013 06:16 PM
Okay, I can fix that too lol! xD

First put the screengui in Lighting, along with the script I made for it.
Then put this script in workspace:

game.Players.PlayerAdded:connect(function (player)
game.Lighting["SCREENGUI"]:clone.Parent = player.PlayerGui
end)

Make sure that you change the name to the correct name.

~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
02 Jan 2013 06:19 PM
game.Lighting["SCREENGUINAME"]:Clone().Parent = player.PlayerGui


> Penguin Power
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
02 Jan 2013 06:20 PM
Lol whoops, not .clone.Parent :PP Clone().Parent

Thanks Penguin! c:

~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】
Report Abuse
SuperSneakyTony is not online. SuperSneakyTony
Joined: 10 Jul 2011
Total Posts: 4428
02 Jan 2013 06:26 PM
...What?



Siggy CHANGE
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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