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
 

Talk To Open Door Script Help Needed *Not a script request*

Previous Thread :: Next Thread 
wickedXxxxlegoxxxx is not online. wickedXxxxlegoxxxx
Joined: 10 May 2011
Total Posts: 952
17 May 2012 08:24 AM
Hi there. I am working on a game called "BlockCraft" and I am trying to make a contest area. I cannot get the script to work. I also want it to only respond to my name. Here is the script so far:

door = script.Parent --Door

function onChatted(msg,speaker) --Message, speaker's name


if (msg == "opencontest") then --Don't edit.
if door.Transparency = 0.9 and
door.CanCollide = false then
end
else
door.Transparency = 0.9
door.CanCollide = false
end

if (msg == "closecontest") then --Don't edit.
if door.Transparency = 1 and
door.CanCollide = true then
end
else
door.Transparency = 1
door.CanCollide = true
end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.ChildAdded:connect(onPlayerEntered)


I can't figure out what's wrong with it. Please help me with it. Thanks.
Report Abuse
agent767 is not online. agent767
Joined: 03 Nov 2008
Total Posts: 4181
17 May 2012 08:36 AM
door = script.Parent --Door

function onChatted(msg,speaker) --Message, speaker's name


if (msg == "opencontest") then --Don't edit.
if door.Transparency == 0.9 and
door.CanCollide == false then
return
else
door.Transparency = 0.9
door.CanCollide = false
end

elseif (msg == "closecontest") then --Don't edit.
if door.Transparency == 1 and
door.CanCollide == true then
return
else
door.Transparency = 1
door.CanCollide = true
end
end
end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.ChildAdded:connect(onPlayerEntered)
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