|
| 10 Dec 2014 08:47 PM |
script.Parent.Parent.Stats.TextColor3 = BrickColor.new("Dark stone grey").Color
script.Parent.MouseEnter:connect(function() enter = true script.Parent.Sound2:Play() script.Parent.Parent.Stats.TextColor3 = BrickColor.new("Black").Color if not enter then script.Parent.Sound2:Stop() script.Parent.Parent.Stats.TextColor3 = BrickColor.new("Dark stone grey").Color end end)
script.Parent.MouseLeave:connect(function() enter = false script.Parent.Sound2:Stop() script.Parent.Parent.Stats.TextColor3 = BrickColor.new("Dark stone grey").Color end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 10 Dec 2014 09:11 PM |
| Check the output next time please. It looks to me like you need to use WaitForChild. |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2014 10:44 PM |
PLEASE PLEASE PLEASE don't use WaitForChild... to many errors with that
Use a repeat wait() until
Also make sure it's the right type of script: Local or Server
If it is a Server don't use the repeat wait()
just use wait(3) or some other number, but it needs to be a reasonable amount. |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2014 11:24 PM |
@Superior
What's wrong with WaitForChild? |
|
|
| Report Abuse |
|
|
|
| 10 Dec 2014 11:27 PM |
| Nothing is terrible about it, it just is more messy and shows more errors, but I know how to fix them up to where they work fine. |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 04:45 PM |
| How exactly would I use Return wait until in this type of script |
|
|
| Report Abuse |
|
|
| |
|
Biost
|
  |
| Joined: 25 Sep 2014 |
| Total Posts: 3922 |
|
|
| 11 Dec 2014 05:24 PM |
repeatwait() until enter == true
I think that could work. |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 05:35 PM |
script.Parent.Parent.Stats.TextColor3 = BrickColor.new("Dark stone grey").Color repeat wait() until script.Parent.MouseEnter:connect(function() enter = true script.Parent.Sound2:Play() script.Parent.Parent.Stats.TextColor3 = BrickColor.new("Black").Color if not enter then script.Parent.Sound2:Stop() script.Parent.Parent.Stats.TextColor3 = BrickColor.new("Dark stone grey").Color end end)
script.Parent.MouseLeave:connect(function() enter = false script.Parent.Sound2:Stop() script.Parent.Parent.Stats.TextColor3 = BrickColor.new("Dark stone grey").Color end)
This works, but only in studio, as before |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 11 Dec 2014 05:59 PM |
Biost, never do == true if you can avoid it. It is messy and it is actually less efficient, if I understand right.
http://wiki.roblox.com/index.php?title=Writing_Clean_Code |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 06:01 PM |
| Jarod, 'repeat wait() until' doesn't work, still only works in studio |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 06:03 PM |
Because "repeat wait() until" is completely wrong. If you want to do that, just do while true do wait() end |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 06:03 PM |
| But you appear to need WaitForChild. Tell us the output. |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 06:04 PM |
There is nothing in the output. Could you show me by putting the changes in my script? |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 06:08 PM |
| NOTE TO ALL SCRIPTERS: I would not recommend using F6 to test "Solo", it is much more reliable to use F7 to start a simulated server. |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 06:08 PM |
| If there is no output, then I am wrong, and I have no idea what is wrong with your script. |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 06:54 PM |
day 65: still no help thanks for atleast trying tho jarod lol |
|
|
| Report Abuse |
|
|
| |
|
Rapster2
|
  |
| Joined: 16 Oct 2009 |
| Total Posts: 1865 |
|
|
| 11 Dec 2014 07:07 PM |
| Using WaitForChild() is a perfectly acceptable method. It looks far cleaner than repeat wait() until blah or a while true do loop. |
|
|
| Report Abuse |
|
|