Heyo! So like i have this teleport brick that doesnt teleport when i add sound and stuff to it, but it works fine if i remove those stuff in the script.. I'm kinda new to Lua, but heres the script.
wait(3)
local cutmusic = game.Workspace.cutmusic4.Sound
local camera = game.Workspace.CurrentCamera
local SceneBlur = game.Lighting.CutBlur
local tele1 = script.Parent.hTele1
local tele2 = script.Parent.hTele2
local debounce = false
tele1.Touched:Connect(function(touched)
if touched.Parent:FindFirstChild("Humanoid") and debounce == false then
print("Touched house tele1, half way.")
local char = touched.Parent
local humanoidrootpart = char.HumanoidRootPart
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = game.Workspace.cutcams.Part1.CFrame
local sound = Instance.new("Sound", game.Workspace.Doorbellsound)
sound.SoundId = "rbxassetid://131558930"
game.Workspace.Doorbellsound.Sound.Playing = true
if not sound.IsLoaded then
sound.Loaded:wait()
wait(2.5)
local sound = Instance.new("Sound", game.Workspace.Dooropensound)
sound.SoundId = "rbxassetid://157167203"
game.Workspace.Dooropensound.Sound.Playing = true
if not sound.IsLoaded then
sound.Loaded:wait()
SceneBlur.Enabled = false
game.Workspace.cutmusic4.Sound.Volume = 0.5
game.Workspace.cutmusic4.Sound.Volume = 0.4
game.Workspace.cutmusic4.Sound.Volume = 0.3
game.Workspace.cutmusic4.Sound.Volume = 0.2
game.Workspace.cutmusic4.Sound.Volume = 0.1
game.Workspace.cutmusic4.Sound.Volume = 0
game.Workspace.cutmusic4.Sound.Playing = false
camera.CameraType = Enum.CameraType.Custom
SceneBlur.Enabled = false
humanoidrootpart.Position = tele2.Position
print("Touched house tele2, All working.")
end
end)
Any solution or tips are welcome!

3 comments
What line?
last one
on line 22 & 30, you are using the if statement when there is no end