I’m working on 2 projects: FNaF 1 and JToH Fangame. I’ve stumbled across a problem though. Let me try to explain. KToH is the original version of JToH, i used that uncopylocked template to make a fangame, but one time, the original creator (ObrenTune) quit., so therefore JToH was made, but JToH was made 2 years ago. It has so much new features that KToH does not, and one of them are Tower Rushes. Example of Tower Rush:
Tower rushes is basically a mix of every tower, when you start, you’re on tower 1st out of 12th, then if you beat that, you go to the 2nd tower, and so on.
Script for a normal tower portal/tower:
local CoolBois={
'lmJaiz',
'ShiverFrosts'
}
local wl={
ToSL=CoolBois,
CoTaT=CoolBois
}
function EnterTower(t,Hit)
local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
local w
if wl[t.Teleporter.TowerValue.Value] then
for _,p in pairs(wl[t.Teleporter.TowerValue.Value]) do
if p==Hit.Parent.Name then
w=true
end
end
else
w=true
end
if Humanoid and w then
if Humanoid.Health ~= 0 then
local InTower = Humanoid:FindFirstChild("InTower")
if InTower then
elseif not InTower then
local iT = Instance.new("StringValue")
iT.Name = "InTower"
iT.Parent = Humanoid
iT.Value = t.Teleporter.TowerValue.Value
local iT = Instance.new("ObjectValue")
iT.Name = "FromTowerPortal"
iT.Parent = Humanoid
iT.Value = t
local Player = game.Players:GetPlayerFromCharacter(Humanoid.Parent)
if Player then
local CSC = game.ReplicatedStorage.RequestTower
if CSC then
CSC:FireClient(Player,t.Teleporter.TowerValue.Value)
local T = Humanoid.Parent:FindFirstChild("Torso")
if T then
T.CFrame = t.TeleportTo.CFrame + Vector3.new(0,5,0)
end
end
end
end
end
end
end
if game.ReplicatedStorage:FindFirstChild("InstantRestart") then
game.ReplicatedStorage.InstantRestart.OnServerEvent:Connect(function(p)
local c=p.Character
if c and c.PrimaryPart then
local h=c:FindFirstChildWhichIsA'Humanoid'
if h and h:FindFirstChild'FromTowerPortal' then
local int=h.FromTowerPortal.Value
p:LoadCharacter()
wait(.1)
local c=p.Character
EnterTower(int,c.PrimaryPart)
end
end
end)
end
for _,t in pairs(script.Parent:GetChildren()) do
if t:IsA'Folder' then
debounce = false
local l=Instance.new('SpotLight',t.Teleporter.TPFRAME)
l.Color=t.Teleporter.TPFRAME.Color
l.Face='Back'
l.Range=9
l.Brightness=50
l.Shadows=true
t.Teleporter.TPFRAME.Touched:Connect(function(Hit)
if debounce~= true then
debounce = true
EnterTower(t,Hit)
wait(0.1)
debounce = false
end
end)
end
end