ooking to make a JToH ring select but don't know how? Look no further! In this tutorial, we'll show you step-by-step how to make a JToH ring select using scripts, roblox studio, and basic knowledge of building.
This JToH ring select tutorial is perfect for beginners who are looking to get started with making JToH fangames/scripting and want to make their first ring select. We'll walk you through every step of the process, from creating the GUI to scripting its functions. By the end of this tutorial, you'll have a basic JToH ring select ready to use in your JToH Fangame!
40 likes for a part 2
First Part of the script:
-- Do not change anything here
local teleportservice = game:GetService("TeleportService")
local TweenService = game:GetService("TweenService")
local lighting = game:GetService("Lighting")
local RingSelectGUI = script.Parent
local player = game.Players.LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
local camera = game.Workspace.CurrentCamera
local menu_music = RingSelectGUI.Music
local clicksoundeffect = RingSelectGUI.Click
local EnterButton = RingSelectGUI.Enter
local Forwards = RingSelectGUI.Left
local Backwards = RingSelectGUI.Right
local desc = RingSelectGUI.Description
local title = RingSelectGUI.Title
local currentring = RingSelectGUI.CurrentRing
local Checkpoints = game.Workspace.Checkpoints
menu_music.SoundId = "rbxassetid://" ---- You can put any music you want by placing its SoundID here
clicksoundeffect.SoundId = "rbxassetid://12221967" --- Optional to change
local RingNames = {
[1] = "Ring 1: Generic Hills", -- You should change these to whatever the names of the rings in your game. You can also add more by duplicating it and increasing the key number
[2] = "Ring 2: Windtop city",
[3] = "Ring 3: Jumping Trees",
}
local Requirements = {
[1] = 0, --- Optional to change, these are your ring requirements
[2] = 5,
[3] = 12,
}
local descriptions = {
[1] = "Requirements: Nothing, Just hope in the game!", --- Feel free to change these aswell and its requirements
[2] = "Requirements: 5 towers beaten, Break zone!",
[3] = "Requirements: 12 towers beaten, Things are getting harder here!",
}
local placeIds = {
[1] = 11394617096, --- PLEASE CHANGE THIS TO YOUR RING PLACE ID
[2] = 0,
[3] = 0.
}
local cameras = { --------- camera positions for each ring, add more if you want
[1] = Checkpoints.RingOne,
[2] = Checkpoints.RingTwo,
[3] = Checkpoints.RingThree,
}
function Update(typeofClick)
clicksoundeffect:Play()
repeat wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
local animation = TweenService:Create(camera, TweenInfo.new(1,Enum.EasingStyle.Sine, Enum.EasingDirection.InOut,0,false,0),{CFrame = cameras[currentring.Value].CFrame})
animation:Play()
end
spawn(Update("Neutral"))
Second Part of the script (make sure it is in the right place):
if currentring.Value (add a greater than sign here bc yt wont allow it) #RingNames then
currentring.Value = #RingNames
end
if currentring.Value (add a less than sign here bc yt wont allow it) 1 then
currentring.Value = 1
end
Third Part of the script:
local Difficulties = { --------- Difficulty bars of each ring
[1] = RingSelectGUI.Ring1Difficulties,
[2] = RingSelectGUI.Ring2Difficulties,
[3] = RingSelectGUI.Ring3Difficulties,
}
print("Current Ring is: "..currentring.Value)
Character:WaitForChild("HumanoidRootPart").Anchored = true
title.Text = RingNames[currentring.Value]
desc.Text = descriptions[currentring.Value]
print(Difficulties[currentring.Value].Name)
Difficulties[currentring.Value].Visible = true
if typeofClick == "positive" then
print("Ring Down")
if currentring.Value (greater than sign) 1 then
Difficulties[currentring.Value - 1].Visible = false
end
end
if typeofClick == "negative" then
print("Ring Up")
if currentring.Value (greater than sign) 1 then
Difficulties[currentring.Value + 1].Visible = false
end
end
Fourth Part of the script:
EnterButton.MouseButton1Down:Connect(function()
local tc = script.Parent.Parent.Parent.leaderstats["Towers Beaten"].Value
print(tc)
if tc (greater than sign)= Requirements[currentring.Value] then
print("success")
teleportservice:Teleport(placeIds[currentring.Value],player)
else
print("fail")
end
end)
spawn(Update("Neutral"))
Tower Counter Script:
while true do
wait(.1)
script.Parent.Text = "Towers Beaten: "..game.Players.LocalPlayer:FindFirstChild("leaderstats"):FindFirstChild("Towers Beaten").Value
end
6 ноя 2022