#Camera like Pokémon

1 messages · Page 1 of 1 (latest)

grand glade
#

I want to make a system, in which if you touch one part, the camera frame updates to another part that acts as a camera at the same time that the player teleports like in Pokémon Emerald, well I've been trying this but I'm getting confused, how would you do it?

tardy kayak
#

it must be currentcamera

grand glade
winter irisBOT
#

studio** You are now Level 1! **studio

grand glade
#

But dont works

tardy kayak
#

yes it'll, share the script

atomic tendon
#

you can use tweens if you don't want something too flashy or pixelated

grand glade
# tardy kayak yes it'll, share the script

local Player = game.Players.LocalPlayer
local tweenService = game:GetService("TweenService")
local Char = Player.Character
local Camera = game.Workspace.CurrentCamera
local RoomCam = game.Workspace:WaitForChild("RoomCam")
local Process = false

wait(game:IsLoaded())
RoomCam.Transparency = 1
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = RoomCam.CFrame
local BlurEffect = Instance.new("BlurEffect")
BlurEffect.Size = 0
BlurEffect.Parent = game.Lighting

local Black = tweenService:Create(script.Parent:WaitForChild("Black") ,TweenInfo.new(2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out),
{Transparency = 0})
local UnBlack = tweenService:Create(script.Parent:WaitForChild("Black") ,TweenInfo.new(2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out),
{Transparency = 1})
local Blur = tweenService:Create(BlurEffect ,TweenInfo.new(2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out),
{Size = 20})
local UnBlur = tweenService:Create(BlurEffect ,TweenInfo.new(1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out),
{Size = 0})

local roomcam = workspace.RoomCam
local salacam = workspace.SalaCam
local TeleportPart1 = workspace.tp1
local TeleportPart2 = workspace.tp2

TeleportPart1.Touched:Connect(function(hit)
local w = hit.Parent:FindFirstChild("HumanoidRootPart")
if w then
w.CFrame = TeleportPart2.CFrame + Vector3.new(0, 5, 0)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = salacam
TeleportPart2.CanTouch = false
wait(1)
wait(1)
TeleportPart2.CanTouch = true
end
end)

TeleportPart2.Touched:Connect(function(hit)
local w = hit.Parent:FindFirstChild("HumanoidRootPart")
if w then
w.CFrame = TeleportPart1.CFrame + Vector3.new(0, 5, 0)
TeleportPart1.CanTouch = false
wait(1)
TeleportPart1.CanTouch = true
end
end)

tardy kayak
#

what is salacam?

#

a CFrame?

grand glade
#

anothercam

tardy kayak
#

or an Instance?

grand glade
#

It is the camera that I want to be seen when touching the part

tardy kayak
#

you just set

#

the camera cframe

#

to an instance

#

salacam is an instance

grand glade
#

yeah well idk it's an instance xd