I’m making a menu for my game, all was working well. Until I was working on the camera and when the player spawns in the camera doesn’t go back to normal/It says fixed in the old position.
Here’s a video example.
robloxapp-20220312-0415226.wmv (1.1 MB)
At the end the camera should snap to the player’s real character, sitting in the back round"I’ve checked and the player is really there".
Here is some of my script if it helps
--LocalScript menu
SelectGui.GenderSelect.Spawn.Activated:Connect(function()
---
local Lighting_OriginDensity = game.Lighting.Atmosphere.Density
local Lighting_OriginColor = game.Lighting.Atmosphere.Color
local Lighting_OriginHaze = game.Lighting.Atmosphere.Haze
local Lighting_OriginFocus = game.Lighting.DepthOfField.InFocusRadius
---
RS:WaitForChild("SpawnCharacter"):FireServer(SendCharacter)
local CameraTweenIn = TweenService:Create(Camera, TweenInfo.new(5), {FieldOfView = 100, CFrame = MeunMapClone.Camera.CFrame + MeunMapClone.Camera.CFrame.LookVector*9})
CameraTweenIn:Play()
TweenService:Create(game.Lighting.Atmosphere, TweenInfo.new(1),{Density = 1, Color = Color3.new(0.694118, 0.0627451, 0.0627451), Haze = 10}):Play()
game.Lighting.DepthOfField.Enabled = true
TweenService:Create(game.Lighting.DepthOfField, TweenInfo.new(1), {InFocusRadius = 0}):Play()
CameraTweenIn.Completed:Wait()
game.Lighting.DepthOfField.Enabled = false
game.Lighting.DepthOfField.InFocusRadius = Lighting_OriginFocus
Camera.FieldOfView = 70
Camera.CameraType = Enum.CameraType.Custom
game.Lighting.Atmosphere.Density = Lighting_OriginDensity
game.Lighting.Atmosphere.Color = Lighting_OriginColor
game.Lighting.Atmosphere.Haze = Lighting_OriginHaze
SelectGui:Destroy()
MeunMapClone:Destroy()
Character:Destroy()
--ServerScript unfinished but it still spawns the character
RS:WaitForChild("SpawnCharacter").OnServerEvent:Connect(function(plr21,Character)
local NewCharacter = Character:Clone()
NewCharacter.Parent = workspace
plr21.Character = NewCharacter
plr21:LoadCharacter(NewCharacter)
end)
end)