local startingPositionGoal = {
Position = UDim2.new(0,314,0,0.498,0)
}
local changePositionGoal = {
Position = UDim2.new(0.314,0,1,0)
}
local outTween = tweenService:Create(questionMainFrame,info1,changePositionGoal)
local inTween = tweenService:Create(questionMainFrame,info2,startingPositionGoal)
local questionLabel = questionFrame["question container"].question
local answerA = answersContainer.answerboxA.answer
local aDetect = answerA.Parent.detect
local answerB = answersContainer.answerboxB.answer
local bDetect = answerB.Parent.detect
local answerC = answersContainer.answerboxC.answer
local cDetect = answerC.Parent.detect
local currentQuestion = 0
local UserAnswers = {}
local function nextQuestion()
currentQuestion += 1
outTween:Play()
if currentQuestion == #chosenQuestionsList + 1 then
finishApplication()
return
end
local currentQuestionArray = chosenQuestionsList[currentQuestion]
local question = currentQuestionArray[1]
local answer1 = currentQuestionArray[2]
local answer2 = currentQuestionArray[3]
local answer3 = currentQuestionArray[4]
local correctAnswer = currentQuestionArray[currentQuestionArray[5] + 1]
questionLabel.Text = question
answerA.Text = answer1
answerB.Text = answer2
answerC.Text = answer3
inTween:Play()
end
The goal of this was for when the user answers a question, it goes off the screen, changes the question and answsers, then goes back on. But this make the screen go to the top left corner, why is that?