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: What do you do when this happens?

Previous Thread :: Next Thread 
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Jan 2015 06:38 PM
I have a mouse.Button1Down script

it worked 100% FINE before, but now it wont do anything

I even put a print after the first like this

mouse.Button1Down:connect(function()
print("Clicked.")

and it did not print anything
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
28 Jan 2015 06:40 PM
it needs an end

mouse needs to be defined
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Jan 2015 06:41 PM
yes, and both were done already

that was just the short example
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
28 Jan 2015 06:43 PM
Does mouse have a value? try checking that.
Report Abuse
Everment is not online. Everment
Joined: 08 Oct 2009
Total Posts: 6020
28 Jan 2015 06:43 PM
Try putting a print before you do the connection. If you don't see the print in the output then you're not even connecting the event, and the problem is occurring elsewhere.
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
28 Jan 2015 06:44 PM
LocalScript

StarterGui

game.Players.LocalPlayer:GetMouse().Button1Down:connect(function() print("Clicked.") end)
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Jan 2015 07:01 PM
@amanda

that is what I did

@the rest of you

what the heck, I just said it isn't printing when I click, that's the problem
Report Abuse
Everment is not online. Everment
Joined: 08 Oct 2009
Total Posts: 6020
28 Jan 2015 07:03 PM
"what the heck, I just said it isn't printing when I click, that's the problem"

Excuse me but I'm attempting to help. The problem may not be in what you've provided so I'm attempting to properly debug. What I mentioned is a common thing that is done when debugging.

That said, if the event isn't being connected to, that's why nothing happens when you click.
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Jan 2015 07:05 PM
Interesting, it didn't print anything before the event either

what is the problem here?
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
28 Jan 2015 07:06 PM
The script isn't running at all, check the properties of the script to see if it is disabled.
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Jan 2015 07:07 PM
yeah, no

it's not disabled

why would I have it disabled [pardon my rudeness, I'm pissed]
Report Abuse
Everment is not online. Everment
Joined: 08 Oct 2009
Total Posts: 6020
28 Jan 2015 07:09 PM
"Interesting, it didn't print anything before the event either. what is the problem here?"

The script isn't getting to that line for some reason. Either it's what roberto said, the script may be Disabled, or somewhere else in the script something else is going wrong and not getting to that statement where you connect.
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Jan 2015 07:11 PM
well I have a bunch of local variables but most of them are waitforchild and repeat wait()s, and they're case-correct

the script worked before anyway which is why I don't understand this predicament
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
28 Jan 2015 07:14 PM
my line of code works perfectly

so the only issue, as far as i can tell, is the rest of your script is messed up

copy and paste the line i said

put it at the very very top of the script

guarentee it will print if it is in a local script and in the startergui
Report Abuse
Everment is not online. Everment
Joined: 08 Oct 2009
Total Posts: 6020
28 Jan 2015 07:18 PM
Try printing out what they're being assigned to once waitforchild/repeat is done

ex:
```
local someObject = game.Workspace:WaitForChild("SomeObject")
print(someObject) -- This'll be printed as soon as `someObject` has been found

local someOtherObject
repeat
wait(0)
someOtherObject = game.Workspace.CurrentCamera
until someOtherObject
print(someOtherObject) -- Again, this'll be printed out as soon as the repeat statement is done
```

This'll help as if one of the variables doesn't print out, then you know that whatever variable didn't print out is causing the issue.
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Jan 2015 07:18 PM
that's not the full script, therefore isn't the full problem

it's pretty much my complaint as an understatement
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