|
| 23 Nov 2015 08:06 PM |
Look I still don't exactly get the whole scripting thing. Don't add any rude comments please. (There probably will still be some...)
I'm trying to create the restriction door for a specific person. When a person enters the game they'll be introduced a menu (i need help with Guis >-<) and then they'll go to their own specific building. I need a script that will make it so that anyone who enters the door other than the building owner won't be allowed inside. I don't even know how to let the gamw know who's the building owner and whos not. Please help ^-^
Thanks in Advance,
ssprincess02 (Aquarious)
P.S. My original account name is ssprincess02 |
|
|
| Report Abuse |
|
|
twinboy03
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 93 |
|
|
| 23 Nov 2015 08:16 PM |
local you = "ssprinces02" local db = false
function onTouched(hit) if db then print("Debounce was true") return end if hit.Parent.Name == you then db = true script.Parent.Transparency = 0.5 script.Parent.CanCollide = false print("User Approved!") wait(2) script.Parent.Transparency = 0 script.Parent.CanCollide = true db = false else print("No.") end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 08:24 AM |
| I'm sorry this didn't work can someone else try to actually explain what to do please? |
|
|
| Report Abuse |
|
|
| |
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 25 Nov 2015 09:24 AM |
| Just look on youtube on "How to make a owner Door" or "How to make a VIP Door" there should be tons in free models as well as for the GUI thing that needs to be done by you most likely |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 09:33 AM |
| :o okay thanks...but how do i make the gui??? |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 09:35 AM |
--Put this script on the interactive brick --Warning! This script ins't tested
local allowId = 0 --Your ID
function onTouch(hit)
if hit.Parent:FindFirstChild("Humanoid") and game.Players:FindFirstChild(hit.Parent.Name) then
if game.Players:FindFirstChild(hit.Parent.Name).userId == allowId then
--Script when allowed
else
--Scipt when denied
end
end
script.Parent.Touched:Connect(onTouch)
--This should work |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 09:39 AM |
for the GUI, just add it inside the script and on the "allowed line" of the script add
local g = script.GUINAME:Clone() g.Parent = game.Players:FindFirstChild(hit.Parent.Name).PlayerGui |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 09:52 AM |
wrong forum....
social jew warrior |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 10:20 AM |
| ....how is this the wrong forum... -_- |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 10:23 AM |
| Josesk thanks for trying to help but it didn't work. >-< |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 10:52 AM |
| well, send me the debug info from the output window, and the full script :P |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 10:53 AM |
| and that naked guy said that because it should to be on Scripting helpers forum, but it's ok |
|
|
| Report Abuse |
|
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
|
| 25 Nov 2015 12:41 PM |
name = ("Player") -- player name
function FunctionName()
-- code
end
function FunctionName2() end
function onTouched(hit) if hit.Parent.Name == name then FunctionName() else FunctionName2() end end
tix are food; not currency. CURRENT RAP: 6.5k! |
|
|
| Report Abuse |
|
|