You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Im trying to tween a UI to appear on screen. -
What is the issue? Include screenshots / videos if possible!
It just… won’t tween, I put debugging logs and it says its at the right position but if I check in explorer its still at its default. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried tweenpostion and it said it could only tween stuff in workspace.
local CollectionService = game:GetService("CollectionService")
local TweenService = game:GetService("TweenService")
local Player = game:GetService("Players").LocalPlayer
local HudU = Player.PlayerGui:WaitForChild("Hud")
local ShopHud = HudU:WaitForChild("ShopUI")
local TacHud = HudU:WaitForChild("TacticalUI")
local camera = workspace.CurrentCamera
local TweenFrame = ShopHud:WaitForChild("TweenFrame")
local CivilStore = CollectionService:GetTagged("CivilStore")
local DStore = CollectionService:GetTagged("ClassDStore")
local CombatStore = CollectionService:GetTagged("CombattiveStore")
local StoreTweenInfo = TweenInfo.new(1,Enum.EasingStyle.Back, Enum.EasingDirection.InOut)
local CameraTweenInfo = TweenInfo.new(0.5,Enum.EasingStyle.Quart, Enum.EasingDirection.Out)
for i,Store in pairs(CivilStore) do
local ShopGuy = Store.Parts.ShopDude
Store.OpenProximityPrompt.ProximityPrompt.Triggered:Connect(function()
local OriginalFace = ShopGuy.Head.face.Texture
local TalkingFace = "http://www.roblox.com/asset/?id=1005618525"
local Goal = {}
Goal.Position = UDim2.new(0.5,0,0.5,0)
local CameraTween = TweenService:Create(camera, CameraTweenInfo, {CFrame = Store.Parts.Camera.CFrame})
local StoreTween = TweenService:Create(TweenFrame,StoreTweenInfo, Goal)
Store.OpenProximityPrompt.ProximityPrompt.Enabled = false
camera.CameraType = Enum.CameraType.Scriptable
CameraTween:Play()
TacHud.Enabled = false
ShopHud.Enabled = true
CameraTween.Completed:Wait()
StoreTween:Play()
print("PlayingShopTween")
-- Print debugging information
print("Initial Position:", TweenFrame.Position)
wait(1)
print("Final Position:", TweenFrame.Position)
end)
end