I need help and I can't really find anything on how to do this. I want the player to touch a part and then it lerps the camera to another part. I've already made the touched and remote event part. Basically, I want it so that when you touch the door it moves the camera to focus on the door and * then opens the door, then transitions to black and teleports you and then transition back to normal * as well as the camera being back to normal. The bits in stars are already done. I want it like the Pokemon brick bronze door opening if anyone knows that.
#Player Camera Focus On Part
1 messages · Page 1 of 1 (latest)
theres tutorials on yt , did you go there first? cuz if not just ping me and ill tell ya a way.
interpolate
I've tried watching tutorials I just don't get it. This is my door script without any camera manipulation:
local Model2 = script.Parent.Model2
local opened = false
local touchpart = script.Parent.DoorFrame
local RE = game.ReplicatedStorage.IrisTransition
local EndLoc = script.Parent.EndLoc
local function OpenDoor(hit)
if opened == false then
opened = true
local player = hit.Parent
for i = 1, 21 do
Model1:SetPrimaryPartCFrame(Model1.Hinge.CFrame*CFrame.Angles(0, math.rad(-5), 0))
Model2:SetPrimaryPartCFrame(Model2.Hinge.CFrame*CFrame.Angles(0, math.rad(5), 0))
wait()
if i == 21 then
wait(0.1)
print(game.Players:GetPlayerFromCharacter(player))
RE:FireClient(game.Players:GetPlayerFromCharacter(player))
wait(1)
local w = hit.Parent:FindFirstChild("HumanoidRootPart")
if w then
w.CFrame = EndLoc.CFrame + Vector3.new(0, 5, 0)
end
end
end
wait(3)
for i = 1, 21 do
Model1:SetPrimaryPartCFrame(Model1.Hinge.CFrame*CFrame.Angles(0, math.rad(5), 0))
Model2:SetPrimaryPartCFrame(Model2.Hinge.CFrame*CFrame.Angles(0, math.rad(-5), 0))
wait()
if i == 21 then
opened = false
print("closed")
end
end
end
end
touchpart.Touched:Connect(function(hit)
OpenDoor(hit)
end)
Yeah I just don’t know how to do that I’ve never really worked with cameras much