is the scanner a normal script or local? if its a server script what you could do is use a remote event and place it in replicated storage and name it like “PlayCamera” or something and in a local script in starter player add the tween function
local playcamevent = game.ReplicatedStorage.PlayCam -- just reference the path of the remote
local cam = workspace.CurrentCamera
local invipart = script.Parent.Parent.InvisibleCamera
local tws = game:GetService("TweenService")
playcamevent.OnClientEvent:Connect(function(plr)
tws:Create(cam,TweenInfo.new(1),{CFrame = invipart.CFrame}):Play()
end)
now in the scannerscript get the remoteevent
local playcam = game.ReplicatedStorage.PlayCam
script.Parent.ClickDetector.MouseClick:Connect(function(player) -- function
playcam:FireClient(player) -- fire the event to the player to play the tween
wait(2) -- Camera move should move at this time
part.Position = script.Parent.Position + Vector3.new(0, -0.1, 0) -- The block moves at the screen for stop being clicked multiple times
--The rest of the script is just frames moving on the screen and material changing and waits
this is the best i could help