|
script.parent.MouseButton1Click:connect(function()
MAKE GUI MOVE
end)
How would you make it so that this goes from {0.219999999, 0}, {0, 0} to {0.219999999, 0}, {0.4, 0} but do it really smoothly? And then once that was done it would change the buttons text from Hide to Show and if clicked again make it go back to {0.219999999, 0}, {0, 0} smoothly and change the text to Hide? I will do the parenting myself. |
|
su8Join Date: 2009-03-06 Post Count: 6334 |
|
|
|
THAT IS USELESS! I TRIED TO DO IT LOADS OF TIMES AND I CANT GET IT TO WORK! UNLESS YOU KNOW THE SCRIPT ON HOW TO DO IT DONT POST WIKIS! |
|
su8Join Date: 2009-03-06 Post Count: 6334 |
There's a sample script which should work..
You're just doing it wrong.. |
|
|
How would you make this work?
script.parent.MouseButton1Click:connect(function()
GUI:TweenPosition(UDim2.new(0.219999999, 0, -0.300000012, 0), "Out", "Quad", 3, true)
end)
So it will go to that position. It comes up wiith
18:05:10 - parent is not a valid member of Script
18:05:10 - Script "Players.ChocCookieRaider.PlayerGui.ScreenGui.TextButton.Scr", Line 1
18:05:10 - stack end |
|
|
su8Join Date: 2009-03-06 Post Count: 6334 |
You haven't defined GUI and it's script.Parent not script.parent |
|
|
From the script it goes
Script.Parent.Parent.Game Info |
|
|
Incase you don't know i really need this script... |
|
NewFissyJoin Date: 2011-01-03 Post Count: 1303 |
You did not define the variable GUI |
|
|
??? Variable Gui? If that is the one that moves it's my last post with the parenting. |
|
|
NewFissyJoin Date: 2011-01-03 Post Count: 1303 |
GUI = script.Parent
script.Parent.MouseButton1Click:connect(function()
GUI:TweenPosition(UDim2.new(0.219999999, 0, -0.300000012, 0), "Out", "Quad", 3, true)
end) |
|
|
Now i get this in the output:
18:52:18 - Players.ChocCookieRaider.PlayerGui.ScreenGui.TextButton.Script:5: 'end' expected (to close 'function' at line 1) near ''
With this script:
script.parent.MouseButton1Click:connect(function()
GUI = script.Parent.Parent.GameInfo
script.Parent.MouseButton1Click:connect(function()
GUI:TweenPosition(UDim2.new(0.219999999, 0, -0.300000012, 0), "Out", "Quad", 3, true)
end)
|
|
|
|
Thanks it works on its own but i need it to work with this:
GUI = script.Parent.Parent.GameInfo
script.Parent.MouseButton1Click:connect(function()
GUI:TweenPosition(UDim2.new(0.219999999, 0, -0.300000012, 0), "Out", "Quad", 3, true)
Script.parent.Text = "Show"
end
script.Parent.MouseButton1Click:connect(function()
GUI:TweenPosition(UDim2.new(0.219999999, 0, 0, 0), "Out", "Quad", 3, true)
Script.parent.Text = "Hide"
end)
Thing is the output comes up with nothing -_#
-Did you know im marshallclan?- |
|
|
Capitalize the p in parent and learn to script properly.
And stop ranting like a 5 year old while you're at it. |
|
|
Done that. Still doesn't work. |
|
|
GUI = script.Parent.Parent.GameInfo
local active = false
script.Parent.MouseButton1Down:connect(function()
if not active then
GUI:TweenPosition(UDim2.new(0.22, 0, -0.3, 0), "Out", "Quad", 3, true)
script.Parent.Text = "Show"
end
end
script.Parent.MouseButton1Down:connect(function()
if active then
GUI:TweenPosition(UDim2.new(0.22, 0, 0, 0), "Out", "Quad", 3, true)
script.Parent.Text = "Hide"
end
end)
Try that. |
|
|
19:53:13 - Players.ChocCookieRaider.PlayerGui.ScreenGui.HIde.Script:9: ')' expected (to close '(' at line 3) near 'script'
>_< |
|
|
GUI = script.Parent.Parent.GameInfo
local active = false
script.Parent.MouseButton1Down:connect(function()
if not active then
GUI:TweenPosition(UDim2.new(0.22, 0, -0.3, 0), "Out", "Quad", 3, true)
script.Parent.Text = "Show"
end
end)
script.Parent.MouseButton1Down:connect(function()
if active then
GUI:TweenPosition(UDim2.new(0.22, 0, 0, 0), "Out", "Quad", 3, true)
script.Parent.Text = "Hide"
end
end)
|
|
|
It works hiding it but when you click to show it it doesn't. >O< |
|
|
I'm gonna try a different way. Should work. Idea:
Use 2 scripts. One UP one DOWN. But if it is currently down the down script will be disabled. When the button is clicked the UP will be disabled but DOWN will be disabled! :D Unless anyone can fix it... |
|
|
|
D: It still only hides and changes text but doesn't go back. >_< |
|