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 » Scripting Helpers
Home Search
 

Re: No output, no nothing! Help!

Previous Thread :: Next Thread 
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 04:49 PM
???????????????????????????????????????
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 04:53 PM
...
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 04:59 PM
h
Report Abuse
TheEpicSamuri is not online. TheEpicSamuri
Joined: 04 Dec 2011
Total Posts: 1343
21 Jul 2012 05:06 PM
Why would you put it in the camera instead of Workspace?
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 05:15 PM
??
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
21 Jul 2012 05:21 PM
You didn't define char.
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 05:25 PM
Ok, I'll try that.
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 05:35 PM
??!?!?!?!?!?!?!?!?!?!??!?!?!!?!?!?!?!?
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 05:37 PM
b u m p
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 05:40 PM
23qrsfdjwhgjxfhvcbxfhfgh i GIVE UP!
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
21 Jul 2012 05:43 PM
LocalScript.
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
21 Jul 2012 05:43 PM
[ Content Deleted ]
Report Abuse
2tallhank is not online. 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
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 06:03 PM
???????
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
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 is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
21 Jul 2012 06:04 PM
[ Content Deleted ]
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
21 Jul 2012 06:06 PM
@Electric, that worked! :D but it doesn't detect that I have Builders Club.
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
21 Jul 2012 06:08 PM
@thedeathmaster - Elaborate please. If it worked, then why isn't it saying that you have BC?
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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