Now, before you get overwhelmed by the script I want to explain the issue.
My meditation script as of recent as been giving me a multitude of bugs, as of recent, and it hasn’t been working visually, as I want it to.
That would be the final thing that I was working on. It was working completely fine, with a few small little bugs that occured, but that could most definetely be fixed. Then, the issue comes in here.
The Script doesn’t seem to be doing the fade in anymore, which is quite odd, so I look in the script, and do meditation a second time. This only occured in the effect finally working, but why would it only work after the second try? It’s simply just odd to me.
local tweenlist :{Tween}&{} = {}
tweenlist.TWAtmo = TweenService:Create(Lighting.Atmosphere, TP, Goals)
tweenlist.TWBlur = TweenService:Create(Lighting.DepthOfField, TP, Goals2)
tweenlist.OGTWAtmo = TweenService:Create(Lighting.Atmosphere, OGTP, OGGoals)
tweenlist.OGTWBlur = TweenService:Create(Lighting.DepthOfField, OGTP, OGGoals2)
tweenlist.BLOCK1 = TweenService:Create(GUIS["Block off One"], TP, TransReversal)
tweenlist.BLOCK2 = TweenService:Create(GUIS["BLock off Two"], TP, TransReversal)
tweenlist.Food = TweenService:Create(GUIS.Parent.MainGUI.Food, TP, Transss)
tweenlist.FoodBG = TweenService:Create(GUIS.Parent.MainGUI.Food.FoodBarBG, TP, Transss)
tweenlist.FoodBar = TweenService:Create(GUIS.Parent.MainGUI.Food.FoodBar, TP, Transss)
tweenlist.Qi = TweenService:Create(GUIS.Parent.MainGUI.Qi, TP, Transss)
tweenlist.QiBar = TweenService:Create(GUIS.Parent.MainGUI.Qi.QiBar, TP, Transss)
tweenlist.QiBarBG = TweenService:Create(GUIS.Parent.MainGUI.Qi.QiBarBG, TP, Transss)
tweenlist.Health = TweenService:Create(GUIS.Parent.MainGUI.HP, TP, Transss)
tweenlist.HealthBar = TweenService:Create(GUIS.Parent.MainGUI.HP.HPBar, TP, Transss)
tweenlist.HealthBG = TweenService:Create(GUIS.Parent.MainGUI.HP.BarBackground, TP, Transss)
tweenlist.Names = TweenService:Create(GUIS.Parent.Names.Names, TP, NameTra)
tweenlist.TC = TweenService:Create(GUIS.Parent.TrainingCreation.ImageLabel, TP, ImageTra)
tweenlist.Click = TweenService:Create(GUIS.Parent.Click.YinYang, TP, ImageTra)
tweenlist.COPPACOIN = TweenService:Create(GUIS.Parent.Coins.CopperCoin, TP, ImageTra)
tweenlist.SILVACOIN = TweenService:Create(GUIS.Parent.Coins.SilverCoin, TP, ImageTra)
tweenlist.GOLDCOIN = TweenService:Create(GUIS.Parent.Coins.GoldCoin, TP, ImageTra)
tweenlist.CopperAmo = TweenService:Create(GUIS.Parent.Coins.CopperCoin.CopperAmount, TP, NameTra)
tweenlist.SilverAmo = TweenService:Create(GUIS.Parent.Coins.SilverCoin.SilverAmount, TP, NameTra)
tweenlist.GoldAmo = TweenService:Create(GUIS.Parent.Coins.GoldCoin.GoldAmount, TP, NameTra)
-----------------------------------------------------------------------------
local tweenlistOG :{Tween}&{} = {}
tweenlistOG.FoodOG = TweenService:Create(GUIS.Parent.MainGUI.Food, TP, TransReversal)
tweenlistOG.FoodBGOG = TweenService:Create(GUIS.Parent.MainGUI.Food.FoodBarBG, TP, TransReversal)
tweenlistOG.FoodBarOG = TweenService:Create(GUIS.Parent.MainGUI.Food.FoodBar, TP, TransReversal)
tweenlistOG.QiOG = TweenService:Create(GUIS.Parent.MainGUI.Qi, TP, TransReversal)
tweenlistOG.QiBarOG = TweenService:Create(GUIS.Parent.MainGUI.Qi.QiBar, TP, TransReversal)
tweenlistOG.QiBarBGOG = TweenService:Create(GUIS.Parent.MainGUI.Qi.QiBarBG, TP, TransReversal)
tweenlistOG.HealthOG = TweenService:Create(GUIS.Parent.MainGUI.HP, TP, TransReversal)
tweenlistOG.HealthBarOG = TweenService:Create(GUIS.Parent.MainGUI.HP.HPBar, TP, TransReversal)
tweenlistOG.HealthBGOG = TweenService:Create(GUIS.Parent.MainGUI.HP.BarBackground, TP, TransReversal)
tweenlistOG.NamesOG = TweenService:Create(GUIS.Parent.Names.Names, TP, NameReversal)
tweenlistOG.TCOG = TweenService:Create(GUIS.Parent.TrainingCreation.ImageLabel, TP, ImageReversal)
tweenlistOG.ClickOG = TweenService:Create(GUIS.Parent.Click.YinYang, TP, ImageReversal)
tweenlistOG.COPPACOINOG = TweenService:Create(GUIS.Parent.Coins.CopperCoin, TP, ImageReversal)
tweenlistOG.SILVACOINOG = TweenService:Create(GUIS.Parent.Coins.SilverCoin, TP, ImageReversal)
tweenlistOG.GOLDCOINOG = TweenService:Create(GUIS.Parent.Coins.GoldCoin, TP, ImageReversal)
tweenlistOG.CopperAmoOG = TweenService:Create(GUIS.Parent.Coins.CopperCoin.CopperAmount, TP, NameReversal)
tweenlistOG.SilverAmoOG = TweenService:Create(GUIS.Parent.Coins.SilverCoin.SilverAmount, TP, NameReversal)
tweenlistOG.GoldAmoOG = TweenService:Create(GUIS.Parent.Coins.GoldCoin.GoldAmount, TP, NameReversal)
----------------------------------------------------------------------------
-- \\ Animation-Related Variables //--
local Anim = script.Meditation
-- \\ Functions // --
GUIS.IgnoreGuiInset = true
UIS.InputBegan:Connect(function(Input, Processed, IsTyping)
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
TriggerEnterLeave = true
local MedAnim = Character.Humanoid.Animator:LoadAnimation(Anim)
if Meditation1 == true then return end
if IsTyping then return end
if Input.KeyCode ~= Enum.KeyCode.M then return end
if GUIS.Enabled then return end
GUIS.Enabled = true
Circle.MouseEnter:Connect(function()
if not TriggerEnterLeave then return end
if Meditation1 then return end
Meditation1 = true
HUM.WalkSpeed = 0
local function TweenDone(state)
if state == Enum.TweenStatus.Completed and Meditation1 == true then
RS.Progressing:FireServer("MeditationTraining")
print("Yeah we good")
else
return
end
end
--|| Tweens Being Played ||--
MedAnim:Play()
MedAnim.Looped = true
for _,v in pairs(tweenlist) do v:Play() end
tweenlist.TWAtmo:Play()
tweenlist.TWBlur:Play()
StarterGUI:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
Part.Parent = workspace
MedParticles.Parent = Humrp
MedParticles2.Parent = Character["Right Arm"]
MedParticles3.Parent = Character["Left Arm"]
MedParticless.Parent = Humrp
MedParticles2.Parent = Character["Right Arm"]
MedParticles3.Parent = Character["Left Arm"]
local Emitter = Instance.new("ParticleEmitter", Part)
Emitter.Rate = 700
Emitter.Lifetime = NumberRange.new(2, 5)
Emitter.Size = NumberSequence.new(0.8,2)
Emitter.Color = ColorSequence.new{
ColorSequenceKeypoint.new(0, White),
ColorSequenceKeypoint.new(1, White)
}
Emitter.SpreadAngle = Vector2.new(-360, 360)
Emitter.Acceleration = Vector3.new(0, -60, 0)
coroutine.wrap(function()
task.wait(4)
GUI.MainGUI.Enabled = false
GUI.Names.Enabled = false
GUI.Coins.Enabled = false
GUI.TrainingCreation.Enabled = false
end)
while GUIS.Enabled do
task.wait(1)
script.Parent.MovingCircle:TweenPosition(UDim2.new(Randomzier:NextNumber(0, 0.962),46 ,Randomzier:NextNumber(0, 0.285),47), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, math.random(5,8), false, TweenDone)
task.wait(3)
for _,v in pairs(tweenlist) do v:Pause() end
Particle.Parent = workspace
end
end)
Circle.MouseLeave:Connect(function()
TriggerEnterLeave = false
MedAnim:Stop()
for _,v in pairs(tweenlist) do v:Cancel() end
tweenlist.OGTWAtmo:Play()
tweenlist.OGTWBlur:Play()
for _,tween in pairs(tweenlistOG) do tween:Play() end
StarterGUI:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
GUI.MainGUI.Enabled = true
GUI.Names.Enabled = true
GUI.Coins.Enabled = true
GUI.TrainingCreation.Enabled = true
MedParticles.Parent, MedParticles2.Parent, MedParticles3.Parent, MedParticless.Parent, MedParticless2.Parent, MedParticless3 = game.ServerStorage:FindFirstChild("Discarded"), game.ServerStorage:FindFirstChild("Discarded"), game.ServerStorage:FindFirstChild("Discarded"), game.ServerStorage:FindFirstChild("Discarded"), game.ServerStorage:FindFirstChild("Discarded"), game.ServerStorage:FindFirstChild("Discarded")
Part.Parent = game.ServerStorage:FindFirstChild("Discarded")
GUIS.Enabled = false
HUM.WalkSpeed = 16
Meditation1 = false
end)
end)