Tween = game:GetService("TweenService")
Vpart = game.Workspace.VisualPart
Camera = game.Workspace.CurrentCamera
local tweenInfo = TweenInfo.new(6)
local goal = {}
goal.subject = Vpart
local tween = Tween:Create(Camera,tweenInfo,goal)
part = game.Workspace.DialoguePart
part.Touched:Connect(function(itemTouchingPart)
if(itemTouchingPart.Parent and game.Players:FindFirstChild(itemTouchingPart.Parent.Name))then
tween:Play()
end
end)
✓ ANSWER ACCEPTED
Can someone please tell me why this localscript doesnt zoom in on my part?[still needs answer]
1 answer
✓ Accepted answer
Well what I see as the main problem is that you didn't change the CameraType to Scriptable which allows the Cameras position to change, etc.
Tween = game:GetService("TweenService")
Vpart = game.Workspace.VisualPart
Camera = game.Workspace.CurrentCamera
Camera.CameraType = Enum.CameraType.Scriptable
local tweenInfo = TweenInfo.new(6)
local goal = {}
goal.subject = Vpart
local tween = Tween:Create(Camera,tweenInfo,goal)
part = game.Workspace.DialoguePart
part.Touched:Connect(function(itemTouchingPart)
if(itemTouchingPart.Parent and game.Players:FindFirstChild(itemTouchingPart.Parent.Name))then
tween:Play()
end
end)
4 comments
0
It was scriptable already i set it to scriptable in the properties of camera
0
it didn't work
0
Check using the explorer when you load the game the camera is set to scriptable.
0
it is
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
You forgot to set the goal.
i already set goal at line 5 and 6