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
 

Re: Help with an answer door?

Previous Thread :: Next Thread 
ModifiedBlox is not online. ModifiedBlox
Joined: 17 Jun 2011
Total Posts: 1850
12 May 2014 09:45 AM
I've been having a problem where it doesn't change the door transparency to 0.7 whenever I say an answer in Uppercase.


local source = string.upper(speaker.Name)
msg = string.upper(msg)

if (msg == "Door") then
Door.CanCollide = false
Door.Transparency = 0.7
wait(5)
Door.CanCollide = true
Door.Transparency = 0
end


Is there any solution to have it register for lowercase and Uppercase?

Report Abuse
InfectedScripts is not online. InfectedScripts
Joined: 29 Oct 2012
Total Posts: 242
12 May 2014 09:49 AM
function chat(player,msg)
if msg:Upper()=="ANSWER" then
script.Parent.Transparecy=0.7
end
end

game.Players.PlayerAdded:connect(player)
player.Chatted:connect(msg)

--didn't test it


test it idk
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
12 May 2014 09:51 AM

local source = string.upper(speaker.Name)
msg = string.upper(msg)

print(msg)

if (msg == "Door") then
Door.CanCollide = false
Door.Transparency = 0.7
wait(5)
Door.CanCollide = true
Door.Transparency = 0
end
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
12 May 2014 09:53 AM
@OP and @BJCarpenter

"if (msg == "Door") then"

Must be DOOR and not Door
Report Abuse
Wreckerbuster67 is not online. Wreckerbuster67
Joined: 29 Jul 2012
Total Posts: 1144
12 May 2014 09:57 AM
--Place the following script in the door.
--Made by Wreckerbuster67, credits unnecessary but would be appreciated.

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if string.lower(msg) == string.lower("ANSWER") then --change "ANSWER" to the answer to the question.
script.Parent.CanCollide = false
script.Parent.Transparency = 0.7
wait(5)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
end
end)
end)
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