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: Only works in studio?

Previous Thread :: Next Thread 
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
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
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
10 Dec 2014 08:52 PM
bump
Report Abuse
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
10 Dec 2014 08:59 PM
b
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
10 Dec 2014 09:11 PM
Check the output next time please. It looks to me like you need to use WaitForChild.
Report Abuse
SuperiorEternal is not online. SuperiorEternal
Joined: 22 Aug 2009
Total Posts: 2365
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
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
10 Dec 2014 11:24 PM
@Superior

What's wrong with WaitForChild?
Report Abuse
SuperiorEternal is not online. SuperiorEternal
Joined: 22 Aug 2009
Total Posts: 2365
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
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
11 Dec 2014 04:45 PM
How exactly would I use Return wait until in this type of script
Report Abuse
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
11 Dec 2014 05:00 PM
bbbb
Report Abuse
Biost is not online. 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
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
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
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
11 Dec 2014 05:42 PM
bumpe
Report Abuse
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
11 Dec 2014 05:57 PM
bbbbbbbbbbbbbbbbbbb
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
11 Dec 2014 06:01 PM
Jarod, 'repeat wait() until' doesn't work, still only works in studio
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
11 Dec 2014 06:03 PM
But you appear to need WaitForChild. Tell us the output.
Report Abuse
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
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
C0mmando323 is not online. C0mmando323
Joined: 15 Dec 2012
Total Posts: 394
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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
11 Dec 2014 06:54 PM
day 65: still no help
thanks for atleast trying tho jarod lol
Report Abuse
BuriedBlock is not online. BuriedBlock
Joined: 14 Dec 2009
Total Posts: 3091
11 Dec 2014 07:01 PM
bumped
Report Abuse
Rapster2 is not online. 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
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