drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 07 Dec 2011 03:42 PM |
For some reason it executes the else statement while I am in the group(Output says nothing and this is not the whole script)...
if player.Character then if (player:IsInGroup(418063)) then player.Character.Health = 0
else torso.CFrame = CFrame.new(Vector3.new(25.5, 13, 0.5)) script.Parent.Gui:clone().Parent = player.PlayerGui end end |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 07 Dec 2011 03:43 PM |
| Could you please give the entire function this is in? I have a feeling you just need a loop. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 03:46 PM |
| If you are in Play Solo mode, that is why. While testing, :IsInGroup() doesn't work, you'll have to publish it to find out. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 07 Dec 2011 03:48 PM |
@fail, hmmm what a descriptive name. I'm not it test, it's play. Here's the whole script:
script.Parent.Touched:connect(function(hit) player = game.Players:GetPlayerFromCharacter(hit.Parent) torso = hit.Parent:FindFirstChild("Torso") if player.Character then if (player:IsInGroup(418063)) then player.Character.Health = 0 else torso.CFrame = CFrame.new(Vector3.new(25.5, 13, 0.5)) script.Parent.Gui:clone().Parent = player.PlayerGui end end end) |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 03:50 PM |
@drnewblet
How was I supposed to know you weren't in test mode? I can script better than you any day, and if your calling ME an epicfail, what does that make you? It's gotta be worse than what I am. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 07 Dec 2011 03:52 PM |
| It's your fault for underestimating me in the first place. If you actually checked me out and done your research, you would've know that I know that. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 03:56 PM |
| Wtf? Underestimating you? Even if I did, I would be RIGHT. Why would I look up your whole history just to answer one thread? Seems stupid right? Of course you should know that feeling. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 07 Dec 2011 04:00 PM |
| Not really, I research people all the time, you are very social, are a low experienced builder and scripter who has gotten away from constant free models. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 04:01 PM |
| Wow, the stalker can actually read! If I did that on you, how would it let me know that you weren't on Play Solo? See my point? |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 04:04 PM |
| Can you stop spamming this thread? Get over it and continue. What part of the script are you wondering about? |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 07 Dec 2011 04:06 PM |
| Knowledge comes from interpretation of what you think they have done. If you have seen my scripts like I did yours, you would probably have guessed that I would have known that. You could have posted "Did you test it in Play Solo?" anyways. |
|
|
| Report Abuse |
|
|
| |
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 07 Dec 2011 04:07 PM |
| @1lith: Did you not read the post title? It says If Else, and in the post I specifically said that the If Else part wasn't working right. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 04:07 PM |
Well sorry that I don't stalk people down to see if they are testing on Play Solo. My bad.
[/sarcasm] |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 07 Dec 2011 04:12 PM |
| Epic if you can't help don't post. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 04:16 PM |
| Then why did you just post that, it didn't help. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 04:18 PM |
@epic
he's the op. He cant help, hes the one asking for it so that was not a valid argument. Not trying to take sides BTW. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
| |
|
|
| 07 Dec 2011 05:06 PM |
| I was going to help you.....but....reading what you did to everyone who tried to help you, i'm not going to help you... So far, all you did was flame the people who tried to help. NO ONE HELP. LET THE THREAD DIE. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 07 Dec 2011 07:49 PM |
Flaming - "The excuse people use when they have nothing good to say"
|
|
|
| Report Abuse |
|
|
|
| 07 Dec 2011 08:11 PM |
To be honest, I can't see an error in the code. There could be these few problems: 1. A brick hit it and the script attempted to get a player form it and failed. 2. That group doesn't exist or the numbers you have are off a bit. 3. The Roblox-LUA engine is broken... AGAIN. No soultion here. |
|
|
| Report Abuse |
|
|
drmiewlo
|
  |
| Joined: 14 Mar 2012 |
| Total Posts: 1782 |
|
|
| 07 Dec 2011 08:24 PM |
| I found the problem. Instead of Character.Health, it's Character.Humanoid.Health. |
|
|
| Report Abuse |
|
|
| |
|