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
 

What is wrong with this script?

Previous Thread :: Next Thread 
Quna is not online. Quna
Joined: 15 Jan 2011
Total Posts: 538
22 Jun 2012 10:08 AM
I wanted to make a vip door to my place, so i found a script on roblox wiki. However, when i copypasted it, it deleted the enters... Now the door just ignores me

local door = script.Parent function open() -- This function will open the door.
door.CanCollide = false -- Make players able to walk through the door.
for transparency = 0, 1, .1 do
door.Transparency = transparency
wait(.1) endend function close() -- This function will close the door.
for transparency = 1, 0, -.1 do
door.Transparency = transparency
wait(.1) end
door.CanCollide = true -- Make players unable to walk through the door.
end -- This function returns the player a certain part belongs to.
function get_player(part) --iterate over each player for _, player in ipairs
(game.Players:GetPlayers()) do --if the part is within the player's character
if part:IsDescendantOf(player.Character) then --return the player
return player end endend door.Touched:connect(function(part) -- If it isn't a character that touched the door, then we ignore it.
local player = get_player(part) if not player then return end local allow = ( player.Name == "MrDoomBringer" or player.Name == "JulienDethurens" or player.Name == "blocco" or player.Name == "NXTBoy" or player:IsInGroup(127081) and player:IsFriendsWith(game.CreatorId) or -- This demonstrates how you can use 'and' to combine two restrictions.
game:GetService('BadgeService'):UserHasBadge(player.userId, 83742351) or game.CreatorId == player.userId ) if allow then open() delay(4, close) endend)
Report Abuse
0jaredvaldez0 is not online. 0jaredvaldez0
Joined: 18 Jun 2012
Total Posts: 140
22 Jun 2012 10:09 AM
[ Content Deleted ]
Report Abuse
0jaredvaldez0 is not online. 0jaredvaldez0
Joined: 18 Jun 2012
Total Posts: 140
22 Jun 2012 10:09 AM
[ Content Deleted ]
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
22 Jun 2012 10:10 AM
copy > paste in word > copy in word > paste in script > thank me
Report Abuse
Quna is not online. Quna
Joined: 15 Jan 2011
Total Posts: 538
22 Jun 2012 10:11 AM
This?

while true do
local door = script.Parent function open() -- This function will open the door.
door.CanCollide = false -- Make players able to walk through the door.
for transparency = 0, 1, .1 do
door.Transparency = transparency
wait(.1) endend function close() -- This function will close the door.
for transparency = 1, 0, -.1 do
door.Transparency = transparency
wait(.1) end while true do
door.CanCollide = true -- Make players unable to walk through the door.
end -- This function returns the player a certain part belongs to.
function get_player(part) --iterate over each player for _, player in ipairs
(game.Players:GetPlayers()) do --if the part is within the player's character
if part:IsDescendantOf(player.Character) then --return the player
return player end endend door.Touched:connect(function(part) -- If it isn't a character that touched the door, then we ignore it.
local player = get_player(part) if not player then return end local allow = ( player.Name == "MrDoomBringer" or player.Name == "JulienDethurens" or player.Name == "blocco" or player.Name == "NXTBoy" or player:IsInGroup(127081) and player:IsFriendsWith(game.CreatorId) or -- This demonstrates how you can use 'and' to combine two restrictions.
game:GetService('BadgeService'):UserHasBadge(player.userId, 83742351) or game.CreatorId == player.userId ) if allow then open() delay(4, close) endend)
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
22 Jun 2012 10:11 AM
Jared that wont work. Its badgeservice.
Report Abuse
0jaredvaldez0 is not online. 0jaredvaldez0
Joined: 18 Jun 2012
Total Posts: 140
22 Jun 2012 10:11 AM
[ Content Deleted ]
Report Abuse
Quna is not online. Quna
Joined: 15 Jan 2011
Total Posts: 538
22 Jun 2012 10:13 AM
Why is it so hard to script a vip door?! >.<
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
22 Jun 2012 10:13 AM
nederlands... zullen we haar gewoon negeren? :P
Report Abuse
Quna is not online. Quna
Joined: 15 Jan 2011
Total Posts: 538
22 Jun 2012 10:14 AM
Can you guys please stay at the topic? >.>
Report Abuse
Quna is not online. Quna
Joined: 15 Jan 2011
Total Posts: 538
22 Jun 2012 10:16 AM
:(
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
22 Jun 2012 10:17 AM
Goed zo :D
Report Abuse
0jaredvaldez0 is not online. 0jaredvaldez0
Joined: 18 Jun 2012
Total Posts: 140
22 Jun 2012 10:23 AM
[ Content Deleted ]
Report Abuse
0jaredvaldez0 is not online. 0jaredvaldez0
Joined: 18 Jun 2012
Total Posts: 140
22 Jun 2012 10:24 AM
[ Content Deleted ]
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
22 Jun 2012 10:28 AM
.... Serieus?
















Oke! :D
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