So I made a script that changes the position of an anchored part using CFrame, but it doesn’t seem to be working. The line in question is below. Can somebody explain why this doesn’t seem to be moving?
local TweenService = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local weaponsUI = player:WaitForChild("PlayerGui"):WaitForChild("Weapons")
weaponsUI.Weapon.MouseButton1Click:Connect(function()
local goal = {}
goal.CFrame = CFrame.new(game.Workspace.CameraPart.Position + Vector3.new(0,0,2.5))
print(goal.CFrame)
local tweenInfo = TweenInfo.new(1.5)
local Tween = TweenService:Create(game.Workspace.CameraPart,tweenInfo,goal)
Tween:Play()
end)