OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 29 Nov 2015 09:09 AM |
The code works, but as soon as I add one line to it, everything stops working properly.
I'm absolutely confused, why does adding one line that works, prevent the entire script from working properly?
Btw, this is with FilteringEnabled turned on, and yes, I am using local scripts. But not changing anything server side.
Adding another localscript does the same thing... |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2015 09:12 AM |
| It depends where the line is put. |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 29 Nov 2015 09:13 AM |
| Ok, but can you explain to me why adding another script does the same thing? |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2015 09:21 AM |
If you're using a open-sourced game then maybe there is a script which checks if any new script is added and running a function to disable or crash the scripts.
That's probably not true since you know about FilteringEnabled(which 90% of the fm'ers think is something that downloads the game to your pc),I'm guessing that the scripts are connected in some way since data store is said to break localscripts(or so I've heard). |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 29 Nov 2015 09:21 AM |
| Can seriously nobody help me? Where am I supposed to find an answer to this, if it doesn't even make any sense? |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 29 Nov 2015 09:26 AM |
| The two scripts are not related in any way. The content is completely different and do two different things. They are in two different locations. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2015 09:49 AM |
The only thing you've said is that when you enter a line in the script doesn't work properly. Adding another script does the same thing. That doesn't really say anything. Answer these:
1) What is the script and what is the line? 2) Have you tried turning FilteringEnabled off? 3) Are there any errors in the Output? 4) Put a "print('Test')" statement on the first line of the script. Does it run? |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 29 Nov 2015 01:01 PM |
@Wonderful
1. It doesn't matter what line it is, everything runs fine, the game reads no errors (other than the typical HTTP error message which has nothing to do with my coding). Whether I add another line to the script, or add another LocalScript with lines in it, the other LocalScript stops running properly. (Specifically one line)
If you wan't me to go into a bit more detail, the only line that's being affected is written as:
Cam.Focus = CFrame.new(CamPart.Position)
Which runs normally without another line added.
2. Yes, I did try to turn FilteringEnabled off, which works but I need it to be on because i'm trying to make this a legit game where I don't want to see hackers in. Better of starting from scratch with FilteringEnabled on rather than converting half the games script to make it compatible with FilteringEnabled after realizing that my game is being messed with, and at the same time being clueless due to one line breaking another.
3. Again, no, there are no error messages coming from my scripts, which are all Local in case you are still wondering.
4. I put that line right under the line I wrote above, which DOES print, but the line before the print refuses to focus onto the specified part (of course the variables were defined earlier in the script.)
If that helped you a little bit, then I would be really glad if anybody could answer. I really wan't to get around this tall standing barrier that doesn't let me pass, otherwise I will give up and go with FilteringEnabled turned off.
Without mistakes I won't learn. I know I am making some sort of mistake here, but that's what I'm trying to find out, I will keep asking, re-posting, until I find my answer, doesn't matter how long it takes, but I don't want to give up on something, like many people do, and never end up finishing their project.
This went on for too long, and I finally decided that this time I will finish what I started, and just because somebody said, "Just turn FilteringEnabled off", doesn't mean I have to listen to an individual, and do as he says.
Oh, before I post, without the added line, the camera, like its supposed to, focuses on the part and I am able to rotate around it freely. Once I add the line, the camera focuses into the position 0,0,0 and the camera also gets stuck, not letting me navigate around the block freely. (Doesn't even focus onto the blocks position). |
|
|
| Report Abuse |
|
|
AuroJosh
|
  |
| Joined: 04 Oct 2015 |
| Total Posts: 484 |
|
|
| 29 Nov 2015 01:17 PM |
Try running that specific line of code through a RemoteEvent.
#code print("Who is this you speak of?".."Dis is AuroJosh!") |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 29 Nov 2015 01:24 PM |
| #Auro, I don't know if that is necessary since it works in public mode anyway. Changing the camera properties needs the job of a LocalScript, because you can only change camera properties locally anyway, so using that method probably won't benefit me in any way. |
|
|
| Report Abuse |
|
|
AuroJosh
|
  |
| Joined: 04 Oct 2015 |
| Total Posts: 484 |
|
|
| 29 Nov 2015 01:35 PM |
True, my bad.
#code print("Who is this you speak of?".."Dis is AuroJosh!") |
|
|
| Report Abuse |
|
|