ChoiceOne.Activated:Connect(function()
module.Fade(ChoiceOne, ChoiceTwo, ChoiceThree, ChoiceFour)
Camera.CFrame = StudentCameraTwo.CFrame
AnaTalk:Play()
Subtitles.Text = "Ana: Yeah I have a question"
wait(4)
Choices.Visible = false
AnaTalk:Stop()
Camera.CFrame = TeacherCameraTwo.CFrame
AnitaTalk:Play()
Subtitles.Text = "Teacher: Don't shout out, Ana I've told you this already."
wait(5)
AnitaTalk:Stop()
ChoicesTwo.Visible = true
end)
After the module.Fade part the script doesn’t work (yes this is a local script) Can anyone help me with this issue, also the function works fine. Just after it that doesn’t
local module = {}
function module.FadeChoosen(Button)
while true do
wait(0.07)
Button.BackgroundTransparency = Button.BackgroundTransparency + 0.1
Button.TextTransparency = Button.TextTransparency + 0.1
if Button.BackgroundTransparency == 1 and Button.TextTransparency >= 1 then
break
end
end
end
function module.Choose(Button)
Button.UIStroke.Enabled = true
while true do
wait(0.06)
if Button.BackgroundTransparency <= 0 then
wait(1.7)
Button.UIStroke.Enabled = false
module.FadeChoosen(Button)
break
else
Button.BackgroundTransparency = Button.BackgroundTransparency - 0.1
end
end
end
function module.Fade(Button, ButtonTwo, ButtonThree, ButtonFour)
while true do
wait(0.07)
ButtonTwo.BackgroundTransparency = ButtonTwo.BackgroundTransparency + 0.1
ButtonTwo.TextTransparency = ButtonTwo.TextTransparency + 0.1
ButtonThree.BackgroundTransparency = ButtonThree.BackgroundTransparency + 0.1
ButtonThree.TextTransparency = ButtonThree.TextTransparency + 0.1
ButtonFour.BackgroundTransparency = ButtonFour.BackgroundTransparency + 0.1
ButtonFour.TextTransparency = ButtonFour.TextTransparency + 0.1
if ButtonTwo.BackgroundTransparency >= 0.95 and ButtonTwo.TextTransparency >= 1 then
module.Choose(Button)
Button.Parent.Visible = false
break
end
end
end
return module
Okay, when testing, I just added a print into each while loop. It gets stuck in “FadeChoosen” and just keeps going. Meaning it probably went past your catch value for the transparency. Working on making it use TweenService now