of     2   
chevron_rightchevron_rightchevron_right

TameDrone
#60417557Wednesday, December 28, 2011 8:14 PM GMT

print("VIP Door Script loaded") GroupId = 355206 function checkOkToLetIn(name) if game.Players[name]:IsInGroup(GroupId) == true then return true 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") Door.Transparency = 0.7 Door.CanCollide = false wait(1) Door.CanCollide = true Door.Transparency = 0 else human.Health= 0 end end end script.Parent.Touched:connect(onTouched) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ How would I make it so that when it allows someone to come in, it shows up a hint saying the person's name, and then says has entered, for example: "TameDrone has entered"
TameDrone
#60417760Wednesday, December 28, 2011 8:17 PM GMT

..?
ThomasChabot
#60417769Wednesday, December 28, 2011 8:17 PM GMT

For what you want to do, you simply need to insert a hint, get the player's name, and add has entered to it. hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has entered" wait(1) hint.Parent = nil The full script: print("VIP Door Script loaded") GroupId = 355206 function checkOkToLetIn(name) if game.Players[name]:IsInGroup(GroupId) == true then return true 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")         Door.Transparency = 0.7         Door.CanCollide = false hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has entered"         wait(1) hint.Parent = nil         Door.CanCollide = true         Door.Transparency = 0     else human.Health= 0     end end end script.Parent.Touched:connect(onTouched)
TameDrone
#60417936Wednesday, December 28, 2011 8:20 PM GMT

I'll try it out, thanks
RATEXmegaGAMER
#60417960Wednesday, December 28, 2011 8:20 PM GMT

print("VIP Door Script loaded") GroupId = 355206 function checkOkToLetIn(name) if game.Players[name]:IsInGroup(GroupId) == true then return true 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") Door.Transparency = 0.7 Door.CanCollide = false wait(1) local h = Instance.new("Hint",Workspace) h.Text = human.Parent.Name .. " has entered" Game.Debris:AddItem(h,5) Door.CanCollide = true Door.Transparency = 0 else human.Health= 0 end end end script.Parent.Touched:connect(onTouched)
RATEXmegaGAMER
#60417991Wednesday, December 28, 2011 8:21 PM GMT

Latetoast :L
TameDrone
#60418615Wednesday, December 28, 2011 8:31 PM GMT

hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has entered" wait(1) hint.Parent = nil The full script: print("VIP Door Script loaded") GroupId = 355206 function checkOkToLetIn(name) if game.Players[name]:IsInGroup(GroupId) == true then return true 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") Door.Transparency = 0.1 wait() Door.Transparency = 0.2 wait() Door.Transparency = 0.3 wait() Door.Transparency = 0.4 wait() Door.Transparency = 0.5 wait() Door.Transparency = 0.6 wait() Door.Transparency = 0.7 wait() Door.Transparency = 0.8 wait() Door.Transparency = 0.9 wait() Door.Transparency = 1 wait() Door.CanCollide = false hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has entered" wait(1) hint.Parent = nil Door.CanCollide = true wait() Door.Transparency = 0.9 wait() Door.Transparency = 0.8 wait() Door.Transparency = 0.7 wait() Door.Transparency = 0.6 wait() Door.Transparency = 0.5 wait() Door.Transparency = 0.4 wait() Door.Transparency = 0.3 wait() Door.Transparency = 0.2 wait() Door.Transparency = 0.1 wait() Door.Transparency = 0 wait() else human.Health= 0 hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has failed to enter" end end end script.Parent.Touched:connect(onTouched) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ I really messed with it this time but I think it will still work unless I made a spelling mistake or something. Will it still work?
ThomasChabot
#60419100Wednesday, December 28, 2011 8:37 PM GMT

That would work, except it wouldn't remove the hint. I suggest putting in a wait(1) after the second end, and then removing the hint (Either hint.Parent = nil, or hint:Destroy()). As well, that's fairly inefficient. You could make it far easier by using for i = 1,0,-0.1 do and for i = 0,1,0.1 do to change the transparency. hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has entered" wait(1) hint.Parent = nil The full script: print("VIP Door Script loaded") GroupId = 355206 function checkOkToLetIn(name) if game.Players[name]:IsInGroup(GroupId) == true then return true 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") for i = 0,1,0.1 do Door.Transparency = i wait() end Door.CanCollide = false hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has entered" wait(1) hint.Parent = nil Door.CanCollide = true wait() for i = 1,0,-0.1 do Door.Transparency = i wait() end else human.Health= 0 hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has failed to enter" end wait(1) hint:Destroy() end end script.Parent.Touched:connect(onTouched)
MeridianVoid
#60419201Wednesday, December 28, 2011 8:39 PM GMT

@Tame's last post AHH, THE INEFFICIENCY.. IT BURNSS..
TameDrone
#60419620Wednesday, December 28, 2011 8:45 PM GMT

I think that vroke it cause it won't work
RATEXmegaGAMER
#60419694Wednesday, December 28, 2011 8:46 PM GMT

@ggfunny Yours isn't that efficient either.
TameDrone
#60419980Wednesday, December 28, 2011 8:49 PM GMT

How would I fix it?
RATEXmegaGAMER
#60420092Wednesday, December 28, 2011 8:51 PM GMT

Sorry but right now I'm doing something else, so I'm not reading the full script, I could just write a new one since it would be easier for me but harder for you.
ThomasChabot
#60420117Wednesday, December 28, 2011 8:51 PM GMT

Is it giving any output for it?
TameDrone
#60420641Wednesday, December 28, 2011 8:58 PM GMT

Idk o:
MeridianVoid
#60420842Wednesday, December 28, 2011 9:02 PM GMT

@RATE My what is isn't efficient..?
ThomasChabot
#60420871Wednesday, December 28, 2011 9:02 PM GMT

Okay, what is it doing / what isn't it doing?
TameDrone
#60421056Wednesday, December 28, 2011 9:06 PM GMT

When I touch the door, nothing happens, it won't to the transparency, it won't show the hint, it won't let me go through it, and it won't kill me. So yeah nothing happens, therefore nothing is working.
TameDrone
#60424577Wednesday, December 28, 2011 9:55 PM GMT

Help?
TameDrone
#60500138Thursday, December 29, 2011 8:47 PM GMT

hint = Instance.new("Hint", workspace) Workspace.group.door.master hint.Text = hit.Parent.Name .. " has entered" wait(1) hint.Parent = nil --The full script: print("VIP Door Script loaded") GroupId = 355206 function checkOkToLetIn(name) if game.Players[name]:IsInGroup(GroupId) == true then return true 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") Door.Transparency = 0.1 wait() Door.Transparency = 0.2 wait() Door.Transparency = 0.3 wait() Door.Transparency = 0.4 wait() Door.Transparency = 0.5 wait() Door.Transparency = 0.6 wait() Door.Transparency = 0.7 wait() Door.Transparency = 0.8 wait() Door.Transparency = 0.9 wait() Door.Transparency = 1 wait() Door.CanCollide = false hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has entered" wait(1) hint.Parent = nil Door.CanCollide = true wait() Door.Transparency = 0.9 wait() Door.Transparency = 0.8 wait() Door.Transparency = 0.7 wait() Door.Transparency = 0.6 wait() Door.Transparency = 0.5 wait() Door.Transparency = 0.4 wait() Door.Transparency = 0.3 wait() Door.Transparency = 0.2 wait() Door.Transparency = 0.1 wait() Door.Transparency = 0 wait() else human.Health= 0 hint = Instance.new("Hint", workspace) hint.Text = hit.Parent.Name .. " has failed to enter" end end end end script.Parent.Touched:connect(onTouched) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --[[It keeps on saying this: 15:44:16 - Workspace.group door.master script:3: '=' expected near 'hint' But Idk what it means by that, no matter where I put an equal sign, it won't work!]]
TameDrone
#60500534Thursday, December 29, 2011 8:53 PM GMT

Help?!?!?!?!
TameDrone
#60500568Thursday, December 29, 2011 8:54 PM GMT

It keeps on saying this: 15:44:16 - Workspace.group door.master script:3: '=' expected near 'hint' But Idk what it means by that, no matter where I put an equal sign, it won't work.
Everesty
#60501134Thursday, December 29, 2011 9:02 PM GMT

Your Problem Is hit.Parent.Name, 'hit' is not defined.
TameDrone
#60501250Thursday, December 29, 2011 9:03 PM GMT

I'm not the best scripter, what would I have to do to define it?
Everesty
#60501332Thursday, December 29, 2011 9:04 PM GMT

function onTouched(hit) end script.Parent.Touched:connect(onTouched)

    of     2   
chevron_rightchevron_rightchevron_right