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 |
|
|
|
| 05 Jul 2015 12:24 PM |
| Make it cancollide and transparent |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 02 Feb 2010 |
| Total Posts: 13 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|