Part of my new game, Stuffed!, requires the CurrentCamera to look at the Player. It isn't working. Here's the code I tried:
game.Players.PlayerAdded:Connect(function(plr)
repeat
local num = math.random(1,4)
local numText = ""
if num == 1 then
numText = "1"
elseif num == 2 then
numText = "2"
elseif num == 3 then
numText = "3"
elseif num == 4 then
numText = "4"
end
if (game.ReplicatedStorage.Positions["L"..numText].Value == "") then
wait(3)
game.ReplicatedStorage.Positions["L"..numText].Value = plr.Name
game.Workspace[plr.Name].Head.CFrame = CFrame.new(workspace["Lobby"..numText].Seat.Position)
workspace.CurrentCamera.CameraSubject = workspace["Lobby"..numText].CameraPart
workspace.CurrentCamera.Focus = CFrame.new(workspace[plr.Name].Head.Position)
end
until game.ReplicatedStorage.Positions.L1.Value == plr.Name or game.ReplicatedStorage.Positions.L2.Value == plr.Name or game.ReplicatedStorage.Positions.L3.Value == plr.Name or game.ReplicatedStorage.Positions.L4.Value == plr.Name
end)
Script Details:
ClassName: Script
Name: Setup
Parent: game.ServerScriptService
What's wrong with the script? I would appreciate some help! Thx!
-JBennettChief9
