I have this script, i have a system where if you click a keyboard key, it locks onto the player (cameraoffset changing so its pointing at the player) and i am wondering how you could do this
The script i have:
Run.Stepped:Connect(function(plays)
if on then
local target = script.Parent.focusPlayer.Value
if anim then
local goal = {}
goal.CameraOffset = val + Vector3.new(0, 0, -3)
local tweenInfo = TweenInfo.new(1.2)
local tween = TweenService:Create(character.Humanoid, tweenInfo, goal)
tween:Play()
anim = false
wait(1.2)
end
-- here is where i need to adjust the cameraoffset
end
end)
It needs to focus on the player.
