i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
|
| 30 Sep 2016 08:41 PM |
My goal is to make the "ProgressL" gui tween with the sound's Time Position...
Does this not work because I cannot set something = to the timelength? (It's read-only)
################################################################################################################################################local CurrentSongFrame = CurrentSongGui:WaitForChild("CurrentSongFrame") local ProgressFrame = CurrentSongFrame:WaitForChild("ProgressFrame") local ProgressL = ProgressFrame:WaitForChild("Progress")
local TimeStuff = ProgressL:WaitForChild("TimeStuff") local TimeLength = TimeStuff:WaitForChild("TimeLength") local TimePosition = TimeStuff:WaitForChild("TimePosition")
local SongName = CurrentSongFrame:WaitForChild("SongName")
local Lazerus = workspace:WaitForChild("Lazerus")
local Progress = game:GetService("ReplicatedStorage"):WaitForChild("Progress")
Progress.OnClientEvent:connect(function(Object) if Object == "Progress" then TimeLength.Value = math.floor(Lazerus.TimeLength) ProgressL:TweenSize(UDim2.new(0,0,1,0), "Out", "Quint", 1, true) while wait() do if not Lazerus.IsPaused then ProgressL:TweenSize(UDim2.new((Lazerus.TimePosition/Lazerus.TimeLength),0,1,0), "Out", "Quint", 1, true) TimePosition.Value = math.floor(Lazerus.TimePosition) if TimePosition.Value == TimeLength.Value then ProgressL:TweenSize(UDim2.new(0,0,1,0), "Out", "Quint", 1, true) break end end end end end)
|
|
|
| Report Abuse |
|
|
i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
|
| 30 Sep 2016 08:43 PM |
All the hashtags are is:
the local player and the player's playergui. Not sure why that's censored but k
|
|
|
| Report Abuse |
|
|
|
| 30 Sep 2016 08:43 PM |
| well is there an output error? |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 30 Sep 2016 08:44 PM |
the time for the tween is always 1 in this code should be timelength-timeposition |
|
|
| Report Abuse |
|
|
i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
|
| 30 Sep 2016 08:45 PM |
No output errors
@ilike
Not the error, it worked fine before but when I messed with it a little bit I broke it. But yes, that works aswell.
|
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 30 Sep 2016 08:47 PM |
i dont understand what is wrong then i think you overcomplicated the way you went about this, but it should work im not sure what results you are seeing vs what you want to see |
|
|
| Report Abuse |
|
|
i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
|
| 30 Sep 2016 08:48 PM |
It's not doing anything at all.. e.e
|
|
|
| Report Abuse |
|
|
i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
|
| 30 Sep 2016 08:49 PM |
I forgot the other thing u said (Short memory), but no, there is nothing I did to overcomplicate this at all imo.
|
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 30 Sep 2016 08:51 PM |
i dont see anything wrong look closely at what you changed try adding prints at certain sections to see where the execution is halted |
|
|
| Report Abuse |
|
|
i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
|
| 30 Sep 2016 08:53 PM |
It's pretty much the same exact thing, I think the checking is haulting it because the values aren't changing. That's the only possible thing I can think of that might be wrong.
|
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 30 Sep 2016 08:55 PM |
tweensize has a callback
Progress.OnClientEvent:connect(function(Object) if Object == "Progress" then ProgressL:TweenSize(UDim2.new(0,0,1,0), "Out", "Quint", 1, true) ProgressL:TweenSize(UDim2.new(1,0,1,0), "Out", "Quint", Lazerus.TimeLength, true,function()ProgressL:TweenSize(UDim2.new(0,0,1,0), "Out", "Quint", 1, true)end) end end)
i dont think you need any of those values or math dealing with position |
|
|
| Report Abuse |
|
|
i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
|
| 30 Sep 2016 08:57 PM |
It turns out I had 2 variables that had the same name. But it doesn't work when the song changes. :/
|
|
|
| Report Abuse |
|
|
llaserx
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 53069 |
|
| |
|
i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
|
| 30 Sep 2016 09:10 PM |
@llas
I'm not going to answer you anymore if you're not going to help. Enough said.
|
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 30 Sep 2016 09:15 PM |
well, the values for all your overthought positioning for the sounds need to be updated when the song changes im assuming lazerus is the sound and that id is changed when a new song needs to be played?
still not too sure what is wrong |
|
|
| Report Abuse |
|
|
i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
| |
|
llaserx
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 53069 |
|
|
| 30 Sep 2016 09:26 PM |
ugh
that taste in my mouth
it taste bad
|
|
|
| Report Abuse |
|
|
i_Movie
|
  |
| Joined: 06 Apr 2014 |
| Total Posts: 11725 |
|
|
| 30 Sep 2016 09:28 PM |
llaser, leave kid. Honestly annoyed with you.
|
|
|
| Report Abuse |
|
|
llaserx
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 53069 |
|
|
| 30 Sep 2016 09:53 PM |
i have a prescription to a cream that u can apply to ur aching area i can give it to u if u need it
|
|
|
| Report Abuse |
|
|