I made a piece of code in a script that should change the CameraSubject to a model that I have inside the player. It doesn't work, no errors. Code:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local MapsFolder = ServerStorage:WaitForChild("Maps")
local Status = ReplicatedStorage:WaitForChild("Status")
local GameLength = 120
local IntermissionLength = 10
local secValue = ReplicatedStorage:WaitForChild("Seconds")
local playersLeft = 0
--Badge
id = 2124480512
function onPlayerEntered(newPlayer)
print("Giving Badge"..id.."To Player"..newPlayer.Name..".")
local b = game:GetService("BadgeService")
b:AwardBadge(newPlayer.userId,id)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
--Leaderstats
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local debris = Instance.new("IntValue")
debris.Name = "Debris"
debris.Parent = leaderstats
end)
--Main loop
while true do
game.Lighting.ClockTime = 12
secValue.Value = "--"
--[[if game.Players.NumPlayers <= 1 then
Status.Value = "Waiting for players."
repeat wait(1) until game.Players.NumPlayers >= 2
end --]]
Status.Value = "Intermision."
for seconds = IntermissionLength,0,-1 do
secValue.Value = seconds
wait(1)
end
local Maps = MapsFolder:GetChildren()
local Map = Maps[math.random(1,#Maps)]
local ClonedMap = Map:Clone()
ClonedMap.Parent = workspace
ClonedMap.Name = "Map"
Status.Value = "The "..Map.Name.." has been chosen"
for secsForMap = 4,0,-1 do
secValue.Value = secsForMap
end
local SpawnPoints = ClonedMap:FindFirstChild("SpawnPoints")
local AvailableSpawns = SpawnPoints:GetChildren()
for i, player in pairs(game.Players:GetPlayers()) do
if player then
character = player.Character
if character then
--Teleport
character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawns[1].CFrame + Vector3.new(0,12,0)
table.remove(AvailableSpawns, 1)
--Morph
for _,v in pairs(character:GetChildren()) do
if v:IsA("BasePart") then
v.Transparency = 1
elseif v:IsA("Accessory") then
v:Destroy()
end
if character:FindFirstChild("Head"):FindFirstChild("face") then
character.Head.face:Destroy()
end
end
local Morph = game:GetService("ServerStorage").DefaultTornado
local ClonedMorph = Morph:Clone()
ClonedMorph.Parent = character
ClonedMorph.Name = "Morph"
character.HumanoidRootPart.Size = character.HumanoidRootPart.Size + Vector3.new(0,58,0)
local MyWeld = Instance.new("Weld")
MyWeld.Parent = ClonedMorph.TornadoPart
MyWeld.Part1 = ClonedMorph.TornadoPart
MyWeld.Part0 = character.HumanoidRootPart
wait()
-- Speed
character.Humanoid.WalkSpeed = Morph.Speed.Value
end
end
end
game.Workspace.Camera.CameraType = Enum.CameraType.Scriptable
game.Workspace.Camera.CameraSubject = character:FindFirstChild("Morph")
Status.Value = "Game in progress."
print("Game started")
for i = GameLength,0,-1 do
secValue.Value = i
--[[if game.Players.NumPlayers <= 1 then
print("Not enough players left.")
break
elseif i == 0 then
print("Time's Up")
break
end --]]
wait(1)
end
print("Game over. Initializing cleanup.")
Status.Value = "The game has ended. Initializing cleanup."
secValue.Value = "--"
for i, player in pairs(game.Players:GetPlayers()) do
character = player.Character
if character then
if character:FindFirstChild("Morph") then
character.Morph:Destroy()
end
end
player:LoadCharacter()
character.Humanoid.WalkSpeed = 20
end
ClonedMap:Destroy()
wait(4)
end
PS. The Camera setting is on line 124.

2 comments
you have to change the CameraType to scriptable first
how?