Hya! Thanks for coming here, I got a little problem. (Camera Player Tween onto the screen)
So I’m making a temperature scanner for my Airport and due to the scanner being a small screen. I would like the players camera to move to the scanners screen for the person to see. Here it how it looks like,
I have a ProximityPrompt on it for it to turn on and do what ever it does in normal script.
It would be nice if someone could tell me how it can be done and what steps I have to.
Extra Information which could help-
-A group model with a normal script for the scanner to work.
-Uses a proximityprompt and in the code proximity:function activates the script to work.
Reply if you need anymore information to help!~
I’ll will give the solution works comfirmation when sloved, Thanks!
You could create a small transparent part infront of your scanner’s screen and simply tween the players camera to the part, once the proximity prompt has been activated.
I’ll check if it works if add click detection. But yes the whole model is anchored and the camera.
Click on link below. Baseplate - Roblox Studio (gyazo.com)
I kept a 2 second wait in the main script for the camera to move but I think has nothing to do with the main script as the camera isn’t moving but the scanner is working.
I put it into the main script and now the script isn’t working (the scanner). Does that mean maybe an asset isn’t loading in my game stopping the camera from working?
--if not game:IsLoaded() then game.Loaded:Wait() end
local cam = workspace.CurrentCamera
local invipart = script.Parent.Parent.InvisibleCamera
local clickdetect = script.Parent.ClickDetector
local tws = game:GetService("TweenService")
clickdetect.MouseClick:Connect(function() -- leave this empty as theres no purpose to change the player state but the camera right?
tws:Create(cam,TweenInfo.new(1),{CFrame = invipart.CFrame}):Play()
end)
make sure this is in a localscript
edit: Im not sure how the scanner works but is it necessary for the the camera code? no need to show the scanner script just wanna know
In my mind this should work but it doesn’t I have runned out of ideas. The should of been just a simple code to be implemented but turned out to be a hassle.