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 » Game Design
Home Search
 

Re: Become owner door not working

Previous Thread :: Next Thread 
eliasgiro is not online. eliasgiro
Joined: 02 Feb 2010
Total Posts: 13
05 Jul 2015 11:45 AM
I've use 3 different scripts and even become owner doors made by others, but whenever i try to test it and try to own it, either it displays a message that i own it, but the door stays there, or nothing at all happens. Anyone got any working scripts or fixes?
Report Abuse
BigThunderBoy is not online. BigThunderBoy
Joined: 23 Jun 2012
Total Posts: 125
05 Jul 2015 12:24 PM
Make it cancollide and transparent
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
05 Jul 2015 12:24 PM
local owner = nil

script.Parent.Touched:connect(function(hit)
if hit and hit.Parent then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
if owner then
if player ~= owner then
hit.Parent:BreakJoints()
end
else
if not game.ServerStorage:FindFirstChild(player.userId) then
Instance.new("Part",game.ServerStorage).Name = player.userId
owner = player
else
hit.Parent:BreakJoints()
end
end
end
end
end)

game.Players.PlayerRemoving:connect(function(player)
if player == owner then
owner = nil
game.ServerStorage:FindFirstChild(player.userId):Destroy()
end
end)



-- Should work, although I wrote it on my phone.
Report Abuse
USArockssoccer15 is not online. USArockssoccer15
Joined: 28 Jun 2010
Total Posts: 9719
05 Jul 2015 12:44 PM
Make sure your scripts changes the door to become invisible or non-can-collided and transparent
Report Abuse
eliasgiro is not online. eliasgiro
Joined: 02 Feb 2010
Total Posts: 13
05 Jul 2015 02:25 PM
I've tried that script and did the transparency etc.. Still nothing. Same thing is happening... D:
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
05 Jul 2015 02:36 PM
There are no errors in the script I posted, the error is in you.

The script does not effect the CanCollide of the door, I expected it to be set to false always.
Report Abuse
eliasgiro is not online. eliasgiro
Joined: 02 Feb 2010
Total Posts: 13
05 Jul 2015 02:48 PM
Then what is my problem... Im really confused, before it worked then it just randomly broke... D:
Report Abuse
eliasgiro is not online. eliasgiro
Joined: 02 Feb 2010
Total Posts: 13
06 Jul 2015 10:09 AM
bump
Report Abuse
oofive2 is not online. oofive2
Joined: 08 May 2011
Total Posts: 1608
06 Jul 2015 10:11 AM
Did you put your name in the correct line?


-/I ᴄᴀɴ'ᴛ ᴅʀᴏᴡɴ ᴍʏ ᴅᴇᴍᴏɴs ᴛʜᴇʏ ᴋɴᴏᴡ ʜᴏᴡ ᴛᴏ sᴡɪᴍ\-
Report Abuse
eliasgiro is not online. eliasgiro
Joined: 02 Feb 2010
Total Posts: 13
06 Jul 2015 11:04 AM
Im not a coder or anything so i dont know how to check... Care to explain?
Report Abuse
oofive2 is not online. oofive2
Joined: 08 May 2011
Total Posts: 1608
06 Jul 2015 11:07 AM
Thats why. In order for the door to let you past you need to tell the door in studio that your the person its suppose to let pass. Here I'll give you a script with your name on it.


-/I ᴄᴀɴ'ᴛ ᴅʀᴏᴡɴ ᴍʏ ᴅᴇᴍᴏɴs ᴛʜᴇʏ ᴋɴᴏᴡ ʜᴏᴡ ᴛᴏ sᴡɪᴍ\-
Report Abuse
oofive2 is not online. oofive2
Joined: 08 May 2011
Total Posts: 1608
06 Jul 2015 11:09 AM
permission = {"eliasgiro","Oofive2","PutAnothernamehereetcetc"}-- This si where you putt he admins

function checkOkToLetIn(name)
for i = 1,#permission do

if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end

local Door = script.Parent

function onTouched(hit)
print("Door Hit")
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
-- a human has touched this door!
print("Human touched door")
-- test the human's name against the permission list
if (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Door.Transparency = 0.7
Door.CanCollide = false
wait(1) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
else human.Health= 0 -- delete this line of you want a non-killing VIP door
end
end
end

script.Parent.Touched:connect(onTouched)



-/I ᴄᴀɴ'ᴛ ᴅʀᴏᴡɴ ᴍʏ ᴅᴇᴍᴏɴs ᴛʜᴇʏ ᴋɴᴏᴡ ʜᴏᴡ ᴛᴏ sᴡɪᴍ\-
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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