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: Check For Badge Error

Previous Thread :: Next Thread 
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
15 Jan 2013 04:16 PM
I have this portion of a VIP door that is supposed to open when you hit it, and have a badge. For some reason, when I hit it, nothing happens. I don't die, it doesn't open. Any reason?

elseif game:GetService("BadgeService"):UserHasBadge(LPlayer.userId, 103343611) then
print("Human passed test")
Door.Transparency = 0.7
Door.CanCollide = false
wait(1) -- this is how long the door is open (U can change this)
Door.CanCollide = true
Door.Transparency = 0
Report Abuse
slyknight88 is not online. slyknight88
Joined: 02 Jan 2010
Total Posts: 1739
15 Jan 2013 04:21 PM
What is the elseif game?
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Jan 2013 04:25 PM
Any output?
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Jan 2013 04:26 PM
If you post the whole script I will check it for you :)
Report Abuse
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
15 Jan 2013 04:34 PM
-_- This is the only portion that doesn't work, which I why I posted only this.
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Jan 2013 04:34 PM
I know, but the reason why it doesn't work may be in the rest of the script.
Report Abuse
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
15 Jan 2013 04:50 PM
The only problem could be the variable.

LPlayer = game.Players:FindFirstChild(hit.Parent.Name)

That's the only other thing that protrains to this area.
Report Abuse
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
15 Jan 2013 05:22 PM
Bump...
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
16 Jan 2013 10:51 AM
Try using

if not hit.Parent:findFirstChild("Humanoid") then return end
LPlayer = game.Players:GetPlayerFromCharacter(hit.Parent)
Report Abuse
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
16 Jan 2013 02:56 PM
I already fixed the script, but thanks! [I ditched this idea and tried a backup.]
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