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
 

Re: Owner GUI on spawn

Previous Thread :: Next Thread 
rex881122 is not online. 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 is not online. 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 is not online. 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 is not online. 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
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