of     1   

Grilox
#65966Tuesday, July 17, 2007 8:35 AM GMT

I'm working on a script that allows someone to open or close a trapdoor using a secret code word. Here's the script I'm using that isnt working model=game.Workspace.trapdoor function onChatted(msg, recipient, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if (msg == "hamburger") then model.Transparency = 1 model.CanCollide = false end if (msg == "we must preserve secrecy") then model.Transparency = 0 model.CanCollide = true end function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered)
Grilox
#66610Wednesday, July 18, 2007 12:10 AM GMT

Any Ideas? I still can't figure out what is wrong.
Grilox
#67241Wednesday, July 18, 2007 8:28 PM GMT

Does anyone have any inkling of what could be wrong? I really need a working code.
lavamaster
#67291Wednesday, July 18, 2007 9:04 PM GMT

it shuld work
WaffleBoy
#67330Wednesday, July 18, 2007 9:39 PM GMT

It's missing an end before the "function onplayerentered."
Grilox
#67333Wednesday, July 18, 2007 9:41 PM GMT

Hm? It has an end before that. Or am I misunderstanding you?
WaffleBoy
#67346Wednesday, July 18, 2007 9:49 PM GMT

end end There's another end after the last message.
Grilox
#67360Wednesday, July 18, 2007 9:59 PM GMT

I removed the ends but It still dosent work. Now it looks like: model=game.Workspace.trapdoor function onChatted(msg, recipient, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if (msg == "hamburger") then model.Transparency = 1 model.CanCollide = false --Make trapdoor disappear and have anyone on the brick fall through end if (msg == "we must preserve secrecy") then model.Transparency = 0 model.CanCollide = true --Return brick to normal condition end function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer)) game.Players.ChildAdded:connect(onPlayerEntered)
lavamaster
#67461Wednesday, July 18, 2007 11:55 PM GMT

he ment this model=game.Workspace.trapdoor function onChatted(msg, recipient, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if (msg == "hamburger") then model.Transparency = 1 model.CanCollide = false --Make trapdoor disappear and have anyone on the brick fall through end if (msg == "we must preserve secrecy") then model.Transparency = 0 model.CanCollide = true --Return brick to normal condition end function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer)) end end game.Players.ChildAdded:connect(onPlayerEntered)
speeder619
#67490Thursday, July 19, 2007 12:20 AM GMT

U KNOW WHER I CAN GET ROCKET SCRIPT AD HOW TO USE IT (ITS MY FIRST TIME)
CasualGirl
#67544Thursday, July 19, 2007 12:53 AM GMT

Hmm... Re-do it and try again, if that's the case
Grilox
#67642Thursday, July 19, 2007 2:17 AM GMT

Even the new script by lavamaster didn't work... dang...
Anaminus
Top 100 Poster
#67645Thursday, July 19, 2007 2:22 AM GMT

------------------------------------------------------------------------------ model=game.Workspace.trapdoor function onChatted(msg, recipient, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if (msg == "hamburger") then model.Transparency = 1 model.CanCollide = false --Make trapdoor disappear and have anyone on the brick fall through end if (msg == "we must preserve secrecy") then model.Transparency = 0 model.CanCollide = true --Return brick to normal condition end end function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered) ------------------------------------------------------------------------------------- Indents. INDENTS. ?-Anaminus-?

    of     1