|
| 19 Jun 2012 05:37 PM |
print("thepickleking1234's Day/Night cycle script loaded")
repeat wait(60) game.Lighting.TimeOfDay = "09:00:00" wait(60) game.Lighting.TimeOfDay = "10:00:00" wait(60) game.Lighting.TimeOfDay = "11:00:00" wait(60) game.Lighting.TimeOfDay = "12:00:00" wait(60) game.Lighting.TimeOfDay = "13:00:00" wait(60) game.Lighting.TimeOfDay = "14:00:00" wait(60) game.Lighting.TimeOfDay = "15:00:00" wait(60) game.Lighting.TimeOfDay = "16:00:00" wait(60) game.Lighting.TimeOfDay = "17:00:00" wait(60) game.Lighting.TimeOfDay = "18:00:00" wait(60) game.Lighting.TimeOfDay = "19:00:00" wait(60) game.Lighting.TimeOfDay = "20:00:00" wait(60) game.Lighting.TimeOfDay = "21:00:00" wait(60) game.Lighting.TimeOfDay = "22:00:00" wait(60) game.Lighting.TimeOfDay = "23:00:00" wait(60) game.Lighting.TimeOfDay = "00:00:00" wait(60) game.Lighting.TimeOfDay = "01:00:00" wait(60) game.Lighting.TimeOfDay = "02:00:00" wait(60) game.Lighting.TimeOfDay = "03:00:00" wait(60) game.Lighting:TimeOfDay = "04:00:00" wait(60) game.Lighting.TimeOfDay = "05:00:00" wait(60) game.Lighting.TimeOfDay = "06:00:00" wait(60) game.Lighting.TimeOfDay = "07:00:00" wait(60) game.Lighting.TimeOfDay = "08:00:00" until false |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 05:38 PM |
This is very very VERY inefficient...
I've seen many like this, they just cause lag. I would use MinutesAfterMidnight.
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
| |
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 19 Jun 2012 05:39 PM |
Why not just: while wait(1) do game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight() + 1) end |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 05:41 PM |
| Yeah sorry I'm a starting scripter...Lol |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 05:43 PM |
Take a look here too:
http://www.roblox.com/Completely-Editable-Day-Night-Cycle-item?id=80775021
That makes it a lot simpler to learn, and to edit to your own needs. Especially if you need to change the speed very quickly.
Sorry for having the name "flappy" in it, it was used for my friend before :P
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:10 PM |
Lol @ OP
That's the kind of day/night script I use. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:11 PM |
@ANTH0NY
Then you should also take a look at my script :P
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:12 PM |
I use this
http://www.roblox.com/Extreme-Advanced-Day-Night-Script-item?id=20987147 |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:18 PM |
:o
I want to look at it :D
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jun 2012 06:25 PM |
Holy cheese....
It is freaking amazing...
I usually never use free models, but I suddenly want to use that.
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:25 PM |
Lol, you should help me with this now:
Here is the script:
VIP = { "ANTH0NY4686" } texture = "http://www.roblox.com/asset/?id=83905099"
function check(name) for i = 1,#VIP do
if (string.upper(name) == string.upper(VIP[i])) then return true end end return false end
local Door = script.Parent
function onTouched(hit) local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then if human.Parent.Torso.roblox.Texture == texture then Door.CanCollide = false wait(0.2) Door.CanCollide = true
elseif (check(human.Parent.Name)) then Door.CanCollide = false wait(0.2) Door.CanCollide = true
end end end
script.Parent.Touched:connect(onTouched)
What it does: Door becomes non-cancollide when a VIP touches it. Is subject to "followers" who can creep in after a VIP.
What I want it to do, either: A) Kill non-VIPs when they touch it, or B) Simply prevent non-VIPs from entering by pushing them away from the door |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:28 PM |
Just make another line that checks if the texture isn't on, and kills the player if that happens.
:P
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:29 PM |
Which would be....
Can you write in that line in the script? That way I can just copy/paste the new script? |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:32 PM |
I put it in your other thread :P
Sorry, let me go find it.
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:33 PM |
if human.Parent.Torso.roblox.Texture ~= texture then human.Humanoid.Health = 0 |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:35 PM |
VIP = { "ANTH0NY4686" } texture = "http://www.roblox.com/asset/?id=83905099" function check(name) for i = 1,#VIP do if (string.upper(name) == string.upper(VIP[i])) then return true end end return false end local Door = script.Parent function onTouched(hit) local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then if human.Parent.Torso.roblox.Texture == texture then Door.CanCollide = false wait(0.2) Door.CanCollide = true elseif (check(human.Parent.Name)) then Door.CanCollide = false wait(0.2) Door.CanCollide = true if human.Parent.Torso.roblox.Texture ~= texture then human.Humanoid.Health = 0 end end end script.Parent.Touched:connect(onTouched)
That might work, I don't really know. Check and let me know.
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:37 PM |
Just wondering, does this make more sense to you? What the guy below me posted.
http://www.roblox.com/Forum/ShowPost.aspx?PostID=70310230 |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:38 PM |
Yes, check both and see which one works.
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:39 PM |
The other guy was right.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:41 PM |
Actually, I don't know. He had the right idea. The only thing Green did wrong was:
"human.Humanoid"
when "human" was already defined as the Humanoid.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:42 PM |
| Lol, would you like to give the whole script a try then? |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:43 PM |
Oh? I thought the human was described as the player, therefore I still needed to describe the Humanoid since he did human.Torso and the Torso isn't in the Humanoid :P
~Leave me in the city with 50 bucks and watch me come back a millionaire~ |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:47 PM |
Neither of them worked. >.< Just making sure I'm testing this right:
Even when the door is not open, if a non-VIP touches it, they should die, right? |
|
|
| Report Abuse |
|
|