|
you = "Bikerking200"
function onTouched(hit)
if hit.Parent.Name == you then
script.Parent.Transparency = 0.5
script.Parent.CanCollide = false
print("User Approved!")
wait(2)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
else
print("No.")
end
end
script.Parent.Touched:connect(onTouched)
It wont let me in. |
|
|
?
local you = "Bikerking200"
local db
function onTouched(hit)
if db then return end
if hit.Parent.Name:lower() == you:lower() then
db = true
script.Parent.Transparency = .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)
|
|
Disti15Join Date: 2009-09-04 Post Count: 2652 |
change you "Bikerking200"
with
you = "bikerking200" --Notice the caps |
|
|
bikerking, The b in you name is lowercase.
local you = "bikerking200"
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) |
|
|
Allofthese`s script worked sorry i forgot to post that. |
|
eldranoeJoin Date: 2011-04-23 Post Count: 6 |
I can't do it either! |
|
|
Why did you bump my 5 month old thread? |
|
|
|
Lol this was when I was a noob at scripting in RBX.Lua.
|
|
NBCKingJoin Date: 2011-10-09 Post Count: 133 |
In your name, you used caps, as you don't have caps in your name. Yes, it makes a difference. |
|
|
Omg let this thread Die this thread was from 5 months ago!.= |
|
|
script.Parent.Touched:connect(function(hit)
local name=hit.Parent.Name
if name=='insert name here' then
script.Parent.Transparency=0.5
script.Parent.CanCollide=false
else
local h=hit.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Health=0
end
end
end)
I posted this 3 years after it was posted. Sorry for being a rebel. |
|
Stefan631Join Date: 2010-12-23 Post Count: 1350 |
I'm sorry, you just killed me. |
|