RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Set a players camera to a specific part when it is touched"
-- This mode only specializes in Module scripts, we recommend using another appropriate mode for getting better responses for this query -- local script (StarterPlayerScripts) local Players = game:GetService("Players") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local camera = workspace.CurrentCamera local part = workspace.Part -- Change this to the part you want to use local function onTouch(hit) if hit.Parent and hit.Parent:FindFirstChild("Humanoid") then camera.CameraType = Enum.CameraType.Scriptable camera.CFrame = CFrame.new(part.Position, part.Position + part.CFrame.LookVector) end end part.Touched:Connect(onTouch)