|
| 24 Feb 2014 07:57 PM |
..make this script not work on certain people? Like a permission script that makes it not work on the people in the permission part of the script.
Here's the script.
script.Parent.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") then if game.Players:GetPlayerFromCharacter(hit.Parent) then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) while wait() do local m = Instance.new("Hint", plr.PlayerGui) m.Text = "Text" end end end end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Feb 2014 04:48 PM |
| Like a permission script from the VIP doors. But I want it for whoever has there name in the script it won't work on them but it will work on the people that don't have their name in the script. |
|
|
| Report Abuse |
|
|
icanxlr8
|
  |
| Joined: 25 Feb 2009 |
| Total Posts: 3686 |
|
|
| 25 Feb 2014 04:54 PM |
So I'm supposing this means something like you only want the message to display if the person is a VIP. So here we go:
deluxeplrs = {icanxlr8, lukemad999} -- Add other people's names by putting a comma after your name, or erasing my name. (Dun do it.)
function checkforplayer(plr) for k, v in pairs(deluxeplrs) do if tostring(v) == plr.Name then fair = true else fair = false end end return fair end script.Parent.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") then if game.Players:GetPlayerFromCharacter(hit.Parent) then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if checkforplayer(plr) == true then while wait() do local m = Instance.new("Hint", plr.PlayerGui) m.Text = "Text" end end end end end)
Did you know it's illegal to hunt Martians on Jupiter? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 25 Feb 2014 05:35 PM |
| he forgot to put deluxeplayers as strings. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 01 Mar 2014 12:14 AM |
dude=dave2011 script.Parent.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") then if game.Players:GetPlayerFromCharacter(hit.Parent) then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr==dude then while wait() do local m = Instance.new("Hint", plr.PlayerGui) m.Text = "Text" end end end end end) change dude to the person you want it to work for |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2014 08:50 AM |
| Well what do I do if I want to put more than 1 persons name? |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 01 Mar 2014 10:19 AM |
dudes={"dave2011","YourMom","stopbeinglazywithtables"} script.Parent.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") then if game.Players:GetPlayerFromCharacter(hit.Parent) then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) for i=1,#dudes do if plr.Name==dudes[i] then while wait() do local m = Instance.new("Hint", plr.PlayerGui) m.Text = "Text" end end end end end end) |
|
|
| Report Abuse |
|
|
| |
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
| |
|
| |
|
| |
|
| |
|
|
| 02 Mar 2014 06:08 PM |
lazy, you could have fixed it. use a NORMAL script the comments are there because I am sure you will mess something up
vip = {"lazyNonScripter"} --Add names as !*STRINGS*! which are "" okay?????
script.Parent.Touched:connect(function(hit) --Make sure parent is a part if hit.Parent:findFirstChild("Humanoid") then --If at least an NPC local plr = game.Players:GetPlayerFromCharacter(hit.Parent) --Gets the player if plr then if --Checks if player exists plr:lower() == vip:lower() then --Checks if admin local m = Instance.new("Hint", plr.PlayerGui) repeat m.Text = "Text" until false --change false to a condition end end end end) |
|
|
| Report Abuse |
|
|
Lem0nzz
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 926 |
|
| |
|
|
| 05 Mar 2014 04:39 PM |
| Okay. Would it screw up the script if I renamed the name of the vip thing? And where ever it shows it name? |
|
|
| Report Abuse |
|
|
| |
|