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 » Scripters
Home Search
 

Re: Okay, Ive been having trouble with this..

Previous Thread :: Next Thread 
WorstUsernames is not online. WorstUsernames
Joined: 06 Jul 2012
Total Posts: 12842
05 Mar 2015 07:00 PM
I want a brick to go from Green to Yellow to Red... When someone says "Start" On times of 0.5

Light1 = script.Parent.Light1

function onChatted(msg, recipient, speaker)

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

if (msg == "start") then
wait(2)
Light1.BrickColor = BrickColor.New("1004")
wait(3)
Light1.BrickColor = BrickColor.New("1020")
wait(5)

Light1.BrickColor = BrickColor.New("21")
Light1.BrickColor = BrickColor.New("37")
wait(10)
end

end

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

game.Players.ChildAdded:connect(onPlayerEntered)





R$267 Tx329
Report Abuse
WorstUsernames is not online. WorstUsernames
Joined: 06 Jul 2012
Total Posts: 12842
05 Mar 2015 07:03 PM
Ill pay 17 R$ for it.

Its an easy script.


R$267 Tx329
Report Abuse
WorstUsernames is not online. WorstUsernames
Joined: 06 Jul 2012
Total Posts: 12842
05 Mar 2015 07:06 PM
hi
Report Abuse
TooKawaiiForSenpai is not online. TooKawaiiForSenpai
Joined: 03 Mar 2009
Total Posts: 3241
05 Mar 2015 07:09 PM
So sometimes players load before scripts

put this at the end then try it

for i, v in pairs(game.Players;GetChildren()) do
onPlayerEntered(v)
end
Report Abuse
TooKawaiiForSenpai is not online. TooKawaiiForSenpai
Joined: 03 Mar 2009
Total Posts: 3241
05 Mar 2015 07:11 PM
Players:GetChildren()

sorry
Report Abuse
WorstUsernames is not online. WorstUsernames
Joined: 06 Jul 2012
Total Posts: 12842
05 Mar 2015 07:11 PM
Nope :/


R$267 Tx329
Report Abuse
WorstUsernames is not online. WorstUsernames
Joined: 06 Jul 2012
Total Posts: 12842
05 Mar 2015 07:13 PM
IDK why >.<


R$267 Tx329
Report Abuse
WorstUsernames is not online. WorstUsernames
Joined: 06 Jul 2012
Total Posts: 12842
05 Mar 2015 07:19 PM
gdfg
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Mar 2015 07:19 PM
Light1 = script.Parent.Light1

function onChatted(msg, recipient, speaker)

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

if (msg == "start") then
wait(2)
Light1.BrickColor = BrickColor.New("1004")
wait(3)
Light1.BrickColor = BrickColor.New("1020")
wait(5)

Light1.BrickColor = BrickColor.New("21")
Light1.BrickColor = BrickColor.New("37")
wait(10)
end

end

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

game.Players.PlayerAdded:connect(function()
game.Players.ChildAdded:connect(onPlayerEntered)
end)

Try

R$697 Don't mess with me! I know karate, taekwando, jijutsu and 50 other dangerous words!
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Mar 2015 07:19 PM
Sorry, mistake
game.Players.CharacterAdded:connect(onPlayerEntered)


R$697 Don't mess with me! I know karate, taekwando, jijutsu and 50 other dangerous words!
Report Abuse
WorstUsernames is not online. WorstUsernames
Joined: 06 Jul 2012
Total Posts: 12842
05 Mar 2015 07:27 PM
No....


R$267 Tx331
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
05 Mar 2015 07:32 PM
local db = false
local function start()
wait(2)
Light1.BrickColor = BrickColor.New("1004")
wait(3)
Light1.BrickColor = BrickColor.New("1020")
wait(5)
Light1.BrickColor = BrickColor.New("21")
Light1.BrickColor = BrickColor.New("37")
wait(10)
end

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg:lower() == "start" then
if not db then
db = true
start()
db = false
end
end
end)
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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