|
|
| 27 Aug 2021 02:00 AM
|
The script is meant to make the camera focus on a player when he/she walks into it and then unfocus them when they walk out of it.
Here's the script:
if (game.Players.LocalPlayer.Character == nil) then return end
local player = game.Players.LocalPlayer
camera = workspace.CurrentCamera
while wait() do
wait(.1)
local character = player.Character
if (character ~= nil and character:FindFirstChild("Torso") ~= nil and character.Torso.Position - camera.CoordinateFrame.p >= 0.5 and character.Torso.Position - camera.CoordinateFrame.p <= 20 ) then
camera.Focus = Vector3.new(character.Torso.Position.x, character.Torso.Position.y + 2, character.Torso.Position.z)
wait(0.1)
end
end
Please help me!
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|