adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 30 Jan 2013 09:01 PM |
This code here:
Flag:BreakJoints(); Flag.CanCollide = true; Flag.Anchored = true; Flag.CFrame = CFrame.new(Flag.Position)*CFrame.Angles(0,0,-math.pi/8);
is located inside a function. Flag is defined, and welded to a Player's back, which is what the BreakJoints(); is for. The code 'executes' but does not work.
However, if I add prints, like so:
print("DropFlag running"); Flag:BreakJoints(); print("Back weld broken"); Flag.CanCollide = true; print("Collidable"); Flag.Anchored = true; print("Anchored"); Flag.CFrame = CFrame.new(Flag.Position)*CFrame.Angles(0,0,-math.pi/8); print("Rotated");
It suddenly starts working.
Can anybody explain to me why? |
|
|
| Report Abuse |
|
|
|
| 30 Jan 2013 09:03 PM |
| I'd hate to go on a tangent but may you teach me how to code? I really want to know. :'( |
|
|
| Report Abuse |
|
|
|
| 30 Jan 2013 09:04 PM |
Perhaps...
Honestly, that is weird. |
|
|
| Report Abuse |
|
|
|
| 30 Jan 2013 09:06 PM |
| There shouldn't be any reason why you'd need to put prints in there for it to work. I'd just test out other parts around it that may have gotten changed. |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 30 Jan 2013 09:06 PM |
The question really isn't a 'may' as you asked but a 'can', and I cannot.
I'm not a good teacher, and I don't have the time even if I was, sorry. Read up what you can on wiki.roblox.com; I'll be adding some game creation tutorials in the summer, so be sure to look out for those. |
|
|
| Report Abuse |
|
|
|
| 30 Jan 2013 09:14 PM |
How did you refresh the script once you added the prints? Perhaps it was the change in how the scripts were fired.
¤ ¤ † K M <( •д• )> X D † ¤ ¤ |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 30 Jan 2013 09:14 PM |
@blobby;
I isolated what was breaking it to a function connection beneath a coroutine for some rotation, fixed that, and it rotated. I then removed the prints()s and it stopped working.
I'm going to assume ROBLOX is being and carry on as usual, thanks anyway. |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 30 Jan 2013 09:21 PM |
| I'm starting 'Play Solo' test mode for each update to the script. |
|
|
| Report Abuse |
|
|