|
| 21 Jul 2012 04:45 PM |
So I made a script that checks to see if you are Builders Club when you enter, if you are or aren't it tell you in a hint. The only problem is, it isn't working. I have no output, so don't ask.
function OPE(player) char = player.Character p = char.Camera msg = Instance.new("Hint",p) if player.MembershipType == "BuildersClub" then msg.Text = "You are Builders Club" else msg.Text = "You are not Builders Club" end end game.Players.PlayerAdded:connect(OPE) |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2012 04:49 PM |
| ??????????????????????????????????????? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 21 Jul 2012 05:06 PM |
| Why would you put it in the camera instead of Workspace? |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2012 05:11 PM |
| Because I want it to show for only the player. That isn't the reason it doesn't work. Idk why. I deleted that part and it still didn't work. Please help! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 21 Jul 2012 05:22 PM |
Oops. I didn't read clearly.
The camera isn't part of the player.
You have to use the method
"game.Workspace.CurrentCamera"
using a LocalScript. |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Jul 2012 05:27 PM |
That doesn't work. This is what I have in the new LocalScript:
function OPE(player) char = player.Character p = game.Workspace.CurrentCamera msg = Instance.new("Hint",p) if player.MembershipType == "BuildersClub" then msg.Text = "You are Builders Club" else msg.Text = "You are not Builders Club" end end game.Players.PlayerAdded:connect(OPE) |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2012 05:35 PM |
| ??!?!?!?!?!?!?!?!?!?!??!?!?!!?!?!?!?!? |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Jul 2012 05:40 PM |
| 23qrsfdjwhgjxfhvcbxfhfgh i GIVE UP! |
|
|
| Report Abuse |
|
|
| |
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
2tallhank
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 2075 |
|
|
| 21 Jul 2012 05:55 PM |
function OPE(player) msg = Instance.new("Hint", player.PlayerGui) if player.MembershipType == "BuildersClub" then msg.Text = "You are Builders Club" else msg.Text = "You are not Builders Club" end end game.Players.PlayerAdded:connect(OPE) |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2012 05:59 PM |
| Do what 2tallhank said to do. It's far easier to insert it into the player's PlayerGui rather than its camera, as the PlayerGui doesn't require a LocalScript. |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2012 06:00 PM |
@2tallhank
Output:
15:59:40.382 - PlayerGui is not a valid member of Player 15:59:40.384 - Script "Workspace.Script", Line 2 15:59:40.385 - stack end 15:59:40.385 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Jul 2012 06:03 PM |
Right, because you're trying to access the PlayerGui before it exists. I'm going to modify your script for efficiency:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:wait() local msg = Instance.new("Hint", player.PlayerGui) msg.Text = player.MembershipType == "BuildersClub" and "You are Builders Club" or "You are not Builders Club" end) |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
|
| 21 Jul 2012 06:06 PM |
| @Electric, that worked! :D but it doesn't detect that I have Builders Club. |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2012 06:08 PM |
| @thedeathmaster - Elaborate please. If it worked, then why isn't it saying that you have BC? |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2012 06:12 PM |
| It works, but it is supposed to say I have BC, but it doesn't. This script is supposed to detect that. So if a player enters without BC, it would say you aren't BC and if a player enters with BC it still says you aren't BC when it is supposed to say You are BC |
|
|
| Report Abuse |
|
|