Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 15 Oct 2015 01:42 PM |
The .Changed:connect event doesn't seem to be working here.
#code while true do wait(1) Seconds.Changed:connect(function() if Seconds.Value == 5 then Seconds.Value = 0 end end) Seconds.Value = Seconds.Value + 1 end
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
|
| 15 Oct 2015 01:43 PM |
| You don't need to use .Changed if it's checking it every second right? |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 15 Oct 2015 01:45 PM |
It doesn't work still.
#code while true do wait(1) Seconds.Value = Seconds.Value + 1 if Seconds.Value == 5 then Seconds.Value = 0 end end
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 15 Oct 2015 01:50 PM |
Heck, I'm probably doing something wrong here.
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
|
| 15 Oct 2015 01:56 PM |
while wait(1) do if Seconds.Value == 5 then Seconds.Value = 0 end Seconds.Value = Seconds.Value + 1 end |
|
|
| Report Abuse |
|
|
|
| 15 Oct 2015 01:56 PM |
You did not define what seconds is
local Seconds = wherever it is located Seconds.Changed:connect(function(Val)
if Val > 1 then print("Bigger than one.") end
end)
and no, you do not need a loop changed is already doing that
|
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 15 Oct 2015 02:03 PM |
Uh... You realize you're connecting an anonymous function over and over for no reason? lol
-=Robo=- |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 15 Oct 2015 02:06 PM |
@Hun Your method didn't seem to work either.
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 15 Oct 2015 02:07 PM |
Uh... You realize you're connecting an anonymous function over and over for no reason? lol[2]
-=Robo=- |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 15 Oct 2015 02:12 PM |
Because no one seems to know what I am scripting, here it is.
Player = game:GetService("Players").LocalPlayer Minutes = nil Seconds = nil repeat wait() until Player.Character for _,Obj in pairs(Player:GetChildren()) do if Obj:IsA("IntValue") and Obj.Name == "leaderstats" then coroutine.wrap(function() for _,Min in pairs(Obj:GetChildren()) do if Min:IsA("StringValue") and Min.Name == "Minutes" then Minutes = Min end end for _,Sec in pairs(Obj:GetChildren()) do if Sec:IsA("StringValue") and Sec.Name == "Seconds" then Seconds = Sec end end end)() end end coroutine.wrap(function() while true do wait(60) Minutes.Value = Minutes.Value + 1 end end)() coroutine.wrap(function() while true do wait(1) Seconds.Changed:connect(function() if Seconds.Value == 5 then Seconds.Value = 0 end end) Seconds.Value = Seconds.Value + 1 end end)()
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 15 Oct 2015 02:15 PM |
that literally doesn't change what I said at all
-=Robo=- |
|
|
| Report Abuse |
|
|
|
| 15 Oct 2015 02:21 PM |
local function checkValue() --code end
StringValue.Changed:connect(checkValue)
while wait(0.1) do StringValue.Value = StringValue.Value + 1 end
Instance.new("BodyVelocity",SenseiWarrior).velocity = CFrame.new(SenseiWarrior.Torso.Position,YourGirlsDMs.Position).lookVector * 10 |
|
|
| Report Abuse |
|
|
|
| 15 Oct 2015 02:23 PM |
Are you trying to save their time on the leaderboard? Insert a local script inside StarterPlayer > StarterPlayerScripts
local Player = game.Players.LocalPlayer
local Seconds = 0 local Minutes = 0 local Hours = 0
while true do Seconds = Seconds + 1
if Seconds > 59 then Minutes = Minutes + 1 Seconds = 0 end
if Minutes > 59 then Hours = Hours + 1 Minutes = 0 end
wait(1) print(Hours..":"..Minutes..":"..Seconds) -- and here you access the leaderboard and change its value end
|
|
|
| Report Abuse |
|
|