rex881122
|
  |
| Joined: 27 Oct 2009 |
| Total Posts: 87 |
|
|
| 20 Mar 2014 10:42 PM |
| So I am trying to make a GUI that controls various components in my place and so I got that made and everything but my problem is having it give the GUI to only me and no one else. I don't know much about the playerEntered in scripting or how I would make it give it to me after each restart. I would love it if you could tell me how to do this. Thanks in advance. |
|
|
| Report Abuse |
|
|
ZombieT2
|
  |
| Joined: 06 May 2012 |
| Total Posts: 6000 |
|
|
| 20 Mar 2014 10:57 PM |
Try this:
print("VIP Door Script loaded") permission = {"rex881122"}
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 print("Human touched door") if (checkOkToLetIn(human.Parent.Name)) then print("Human passed test") game.StarterGui.GuiName.Frame.Visible = true wait(4) game.StarterGui.GuiName.Frame.Visible = false end end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
rex881122
|
  |
| Joined: 27 Oct 2009 |
| Total Posts: 87 |
|
|
| 21 Mar 2014 11:35 PM |
| That is for a door. I am trying to get a script that gives you a GUI on spawn but only for specific people so I can't just put it in starter GUIs |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 21 Mar 2014 11:38 PM |
And it was a Free Model as welll
game.Players.PlayerAdded:connect(function(p) wait() if p.userId == game.CreatorId then p.CharacterAdded:connect(function(char) wait() char:MoveTo(ownerSpawn.Position) game.ServerStorage.CLONINGGUI:clone().Parent = p.PlayerGui end) end end) |
|
|
| Report Abuse |
|
|