darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
Ive made this Small GUI (Its my first time.) and i used Wiki to find out what to do. now ive used the script
function onClick()
print("Clicked")
end
element.MouseButton1Click:connect(onClick)
and put
function onClick()
print("Clicked")
end
Script.Parent.Parent.EnergyG1.TextTransparency = 0
element.MouseButton1Click:connect(onClick)
In it.
Though whenever i click the TextButton Nothing happens.
The Layout in my Workspace is : GuiMain-->Frame-->ImageLabel and EnergyG1(TextButton)-->Script
Thank you if you want to help :D |
|
|
function onClick()
print("Clicked")
Script.Parent.Parent.EnergyG1.TextTransparency = 0
end |
|
|
Oh, and the connection line.
~-(Floodcheck)-~ |
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
Its Probably Again some dumb problem but whenever i test the script in solo i cant hit the button. it just makes me walk to where i clicked. How can i click it? :D (I Hit Random things in property mayby that has to do with it :S) |
|
|
function onClick()
print("Clicked")
--Anything else you want to happen goes INSIDE the function, right under here:
Script.Parent.Parent.EnergyG1.TextTransparency = 0
end
--element it's not a specified variable, but since you gave me the Layout, I can do that
script.Parent.MouseButton1Down:connect(onClick)
--Also, it's MouseButton1Down, not Click :D
--Why script.Parent ? Assuming what you called 'element' it's the button (from the event MouseButton1Clicked, that is 'Down'), and since I had the layout, EnergyG1 (the button) holds the script, this means that the script it's the button's parent.
|
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
:o i did alot wrong :o
Sneaky Wiki... |
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
Ok i put it all in and when i press the button nothing still happens :C
i have in properties the Frame and Button Active as true but =/
I have absoluteley no idea what im doing wrong :[ |
|
|
Make it like this:
StarterGui
>ScreenGui
>>Gui
>>>Script |
|
CrniOraoJoin Date: 2008-10-12 Post Count: 2274 |
There is no such property of GUI to make transparent text, just set text of the button to "" --nothing
That should solve the problem! |
|
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
Meh, No work |
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
Nvm, i ment that for 3 above :P
You guys post fast o.o |
|
|
Why, thank you! :D
Floodcheck hates me for posting fast. O.o |
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
Ok ife Done the stuff you guys said and i go into solo and click on it and even Output wont bother to spit out the error =/ |
|
|
'script' is capitolised... |
|
|
No, it's not.
-(FLOODCHECK)- |
|
|
function onClick()
print("Clicked")
Script.Parent.Parent.EnergyG1.TextTransparency = 0 --ORLY NAO?
end |
|
|
Script is never captialized. It's script.Parent. And did you even try that script? |
|
pwnedu46Join Date: 2009-05-23 Post Count: 7534 |
function onClick()
print("Clicked")
script.Parent.Parent.EnergyG1.Text = ""
end
script.Parent.MouseButton1Click:connect(onClick)
|
|
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
Ok it Worked Finally ^.^
Oki. While you guys are still here :P
I Tried to learn from a couple of free models how to make a script that gives you the GUI when you go in a seat and remove it when you jump out but without succes D:
Could anyone Help me with this? This would be the last thing i need to know on this Thread :P |
|
|
---Put this in the character
function onValueChange(Val)
if (Val == "Sit") then
if (Val == true) then
--Show gui stuff
elseif (Val == false) then
--Hide gui stuff
end
end
end
script.Parent.Humanoid.ValueChanged:connect(onValueChange)--Might be wrong |
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
Put it in character? |
|
|
darkboedaJoin Date: 2009-04-26 Post Count: 3724 |
How :D |
|