当您加载新底板时,用于将相机移回默认设置的 roblox 脚本不起作用。只有 2 个脚本会干扰相机。包含以下内容的本地脚本:
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
player.Team = game.Teams[script.Parent.Parent.TextLabel.Text]
player.PlayerGui.teamSelect.Enabled = false
local cam = workspace.CurrentCamera
local char = player.Character or player.CharacterAdded:Wait()
cam.CameraType = Enum.CameraType.Fixed
cam.CameraSubject = char.Head
end)
还有另一个内容:
local player = game.Players.LocalPlayer
local cam = workspace.CurrentCamera
repeat cam.CameraType = Enum.CameraType.Scriptable wait() until cam.CameraType == Enum.CameraType.Scriptable
cam.CFrame = workspace.camPositions[script.Parent.TextLabel.Text.."Cam"].CFrame
我尝试了很多大型人工智能机器人,在互联网上搜索了太长时间,但没有任何效果。
要将相机重置为默认值,您应该将
CameraType
设置为 Custom
,将 CameraSubject
设置为角色的人形。
cam.CameraType = Enum.CameraType.Custom
cam.CameraSubject = char:FindFirstChildOfClass("Humanoid")