Hi, I was wondering how to make the camera go with the character, it just stays at spawn and doesn’t go with the character. Sorry if i’m bad at explaining. Any help would be appreciated
local RoundService = {}
local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
function RoundService.ChoosePlayer()
local players = Players:GetPlayers()
if #players == 0 then
return warn("theres no players")
end
local chosen = players[math.random(1, #players)]
print("Chosen:", chosen)
return chosen
end
function RoundService.TeleportPlayers(cframe)
local players = Players:GetPlayers()
for i, player in players do
if player.Character then
player.Character:PivotTo(cframe)
end
end
end
function RoundService.CountdownAsync(duration)
for i = duration, 1, -1 do
workspace:SetAttribute("Clock", i)
task.wait(1)
end
end
function RoundService.IntermissionAsync(INTERMISSION_TIME)
workspace:SetAttribute("Status", "Intermission")
RoundService.CountdownAsync(INTERMISSION_TIME)
end
function RoundService.RunGameAsync(ROUND_TIME, MAP)
workspace:SetAttribute("Status", "Game")
local chosen = RoundService.ChoosePlayer()
local MonsterModel = RS:WaitForChild("Monster")
local newMonster = MonsterModel:Clone()
newMonster.Name = chosen.Name
newMonster.Parent = workspace
if chosen.Character then
chosen.Character:Destroy()
end
chosen.Character = newMonster -- I think this is the problem idk
RoundService.TeleportPlayers(MAP.CFrame)
RoundService.CountdownAsync(ROUND_TIME)
end
return RoundService