This is all of the assets that are in here, I’ve also checked other models of mine that incorporate the TweenPosition and they work fine. I don’t know why this one doesn’t.
Edit: I’ve also tried resetting Roblox Studio, still bugs out
do you maybe have any other scripts that tween or move that frame? maybe one is triggering at the same time as this tween, or right before the tween triggers
local TweenService = game:GetService("TweenService")
local Camera = workspace.CurrentCamera
local tweenInf = TweenInfo.new(1, Enum.EasingStyle.Circular, Enum.EasingDirection.Out, 0, false, 0)
local tweenInfText = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0)
local NPC = game.Workspace.NPCGroup.NPC
local MainCam = game.Workspace.NPCGroup.Camera
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Dialog = script.Parent.Parent.DialogueHolder
local Choices = script.Parent
Choices.Position = UDim2.new(0.53, 0, 0.399, 0)
local DialogText = Dialog.Dialogue
local NPCName = Dialog.NPCName
local function typeMessage(txt, typeTime)
for i=1, #txt do
DialogText.Text = string.sub(txt, 1, i)
wait(typeTime / #txt)
end
end
local RepSto = game.ReplicatedStorage
local Trigger = RepSto.DialogChoiceTrigger
local CorrectChoice = RepSto.CorrectChoice
function Tween(Camera, cameranew)
local info = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0)
Camera.CameraType = Enum.CameraType.Scriptable
local tween = TweenService:Create(Camera, tweenInf, {CFrame = cameranew.CFrame})
tween:Play()
end
Trigger.OnClientEvent:Connect(function()
Tween(game.Workspace.CurrentCamera, MainCam)
Choices:TweenPosition(UDim2.new(0.56, 0, 0.399, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Circular)
end)
This is the entire script. It’s not the final version yet since I am just testing it.
try setting the parent of Choices after setting its position to maybe stop the teleporting from when it loads
then for the tweening, what’s triggering the OnClientEvent? is it when you click an option?
For the first one, I don’t really get what you mean?
For the second one, it’s triggered by a prompt trigger, and inside the prompt is a server script which does a FireClient() and connects to the Trigger on the local script