Playback starts YouTube’s embedded player (privacy-enhanced mode).
How to Make a Piggy Game Part 2: Start Screen And Doors
ChannelCornFakeDescription from the creator
screen gui local script:
local camera = workspace.CurrentCamera
local playBtn = script.Parent.PlayBtn
repeat
wait()
camera.CameraType = Enum.CameraType.Scriptable
print(camera.CameraType)
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = workspace.CameraFocusPart.CFrame
playBtn.MouseButton1Click:Connect(function()
camera.CameraType = Enum.CameraType.Custom
script.Parent:Destroy()
end)
Door Script:
local door = script.Parent.Door
local closePlaceHolder = script.Parent.DoorClosed
local openPlaceHolder = script.Parent.DoorOpened
local clickDetector = door.ClickDetector
local closeSound = door.Close
local openSound = door.Open
local debounce = true
local isOpened = false
local info = TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)
local closedProperties = {CFrame = closePlaceHolder.CFrame}
local openProperties = {CFrame = openPlaceHolder.CFrame}
local closeTween = game.TweenService:Create(door, info, closedProperties)
local openTween = game.TweenService:Create(door, info, openProperties)
clickDetector.MouseClick:Connect(function()
if debounce then
debounce = false
if not isOpened then
openSound:Play()
openTween:Play()
else
closeSound:Play()
closeTween:Play()
end
isOpened = not isOpened
wait(1)
debounce = true
end
end)
Game Link: web.roblox.com/games/340975715/How-To-Make-A-Pi…
Thank You For Watching Part 2 It Was More Fast Then I Tought So Yea Cya Guys In The Next Vid! Ciao Guys!
local camera = workspace.CurrentCamera
local playBtn = script.Parent.PlayBtn
repeat
wait()
camera.CameraType = Enum.CameraType.Scriptable
print(camera.CameraType)
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = workspace.CameraFocusPart.CFrame
playBtn.MouseButton1Click:Connect(function()
camera.CameraType = Enum.CameraType.Custom
script.Parent:Destroy()
end)
Door Script:
local door = script.Parent.Door
local closePlaceHolder = script.Parent.DoorClosed
local openPlaceHolder = script.Parent.DoorOpened
local clickDetector = door.ClickDetector
local closeSound = door.Close
local openSound = door.Open
local debounce = true
local isOpened = false
local info = TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)
local closedProperties = {CFrame = closePlaceHolder.CFrame}
local openProperties = {CFrame = openPlaceHolder.CFrame}
local closeTween = game.TweenService:Create(door, info, closedProperties)
local openTween = game.TweenService:Create(door, info, openProperties)
clickDetector.MouseClick:Connect(function()
if debounce then
debounce = false
if not isOpened then
openSound:Play()
openTween:Play()
else
closeSound:Play()
closeTween:Play()
end
isOpened = not isOpened
wait(1)
debounce = true
end
end)
Game Link: web.roblox.com/games/340975715/How-To-Make-A-Pi…
Thank You For Watching Part 2 It Was More Fast Then I Tought So Yea Cya Guys In The Next Vid! Ciao Guys!
About this tutorial
CornFake published this 15:54 video tutorial on July 5, 2020. It has been watched 18,114 times on YouTube.
Share
This tutorial in other languages
- FRComment faire un jeu Piggy Partie 2: écran de démarrage et portes
- ESCómo hacer un juego Piggy Parte 2: Pantalla de inicio y puertas
- PTComo fazer um Piggy Jogo Parte 2: Tela de início e Portas
- ITCome fare un gioco 2 Piggy Parte: Schermo e portelli di avvio
- DEWie man einen Piggy Spiel Teil 2: Startbildschirm und Türen
- NLScreen Start en deuren: Hoe maak je een Piggy Game Part 2 Zorg
- RUКак сделать Piggy игры Часть 2: Start Screen и двери
- PLJak zrobić część Piggy Runda 2: Ekran startowy i drzwi
- JAスタート画面とドア:ピギーゲームのパート2を作る方法
- ARكيفية جعل الخنزير لعبة الجزء 2: بدء تشغيل الشاشة والأبواب
- HIप्रारंभ स्क्रीन और दरवाजे: कैसे एक पिग्गी खेल भाग 2 बनाने के लिए
- IDCara Membuat Piggy Game Bagian 2: Mulai Layar Dan Pintu