Repository navigation
Releases: Dynamic155/Roblox-Top-Down-Camera
Releases · Dynamic155/Roblox-Top-Down-Camera
Release list
Top-down camera game example.
Release:
This game attached includes a simple 2-stage obby.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local mouse = player:GetMouse()
local function updateCharacterRotation()
local mousePosition = mouse.Hit.p
local direction = (mousePosition - humanoidRootPart.Position).Unit
direction = Vector3.new(direction.X, 0, direction.Z)
local lookAt = CFrame.new(humanoidRootPart.Position, humanoidRootPart.Position + direction)
humanoidRootPart.CFrame = lookAt
end
RunService.RenderStepped:Connect(updateCharacterRotation)The script above makes the character rotate to look towards the mouse for an interesting effect. It's not the best, however it works just fine. If you have any issues make sure to read the readme to see hot to contribute.