#Camera “system” don’t works

1 messages · Page 1 of 1 (latest)

brazen sail
#

I'm creating a system, if you can call it that, but it's not working properly and I don't know how to fix it. Does anyone know?

#

here is 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
Camera.CFrame = salacam.CFrame
w.CFrame = TeleportPart2.CFrame + Vector3.new(0, 5, 0)
TeleportPart2.CanTouch = false
wait(1)
TeleportPart2.CanTouch = true
-- Update camera CFrame to SalaCam when TeleportPart1 is touche
end
end)

#

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

ocean wasp
brazen sail
#

You don’t help

ocean wasp
brazen sail
#

??

#

It's hard for me, I'm just starting out.

ocean wasp
ocean wasp
#

when i was a beginner, there was no ai chatgpt to get free code from, you just can never tell these days thonkoof

brazen sail
grand iglooBOT
#

studio** You are now Level 2! **studio

ocean wasp
little quarry
#

You should format your code using markdown

brazen sail
brazen sail
ocean wasp
teal nexus
#

why is there wait(game:IsLoaded())

brazen sail
teal nexus
#

do you know how those function work

brazen sail
teal nexus
brazen sail
teal nexus
brazen sail
teal nexus
#

there's alot of mistakes in your code taken from a tutorial, I'm not going to solve all the mistakes but I recommend rewatching the tutorial or find another tutorial. Sayonara