How to make a game like The Mimic in Roblox Studio (guide)
Part 9 - Learning how to make the screen move / camera bobble effect.
Join my roblox group: https://www.roblox.com/groups/1129746...
Join my discord server:
/ discord
Script:
-- assigning variables --
local char = script.Parent
local human = char:WaitForChild("Humanoid")
local root = char:WaitForChild("HumanoidRootPart")
game:GetService("RunService").RenderStepped:Connect(function(enter) -- enter function --
local Time = tick()
if human.MoveDirection.Magnitude (more than -- change to symbol -- ) 0 then
local speed = root.Velocity.Magnitude
local X = math.cos(Time * speed) / 2
local Y = math.abs(math.sin(Time * speed)) / 2
local bobble = Vector3.new(X, Y, 0)
human.CameraOffset = human.CameraOffset:Lerp(bobble, intensity) -- enter designated value --
else
human.CameraOffset = human.CameraOffset * 1 -- humanoid's camera offset --
end
end)
#Roblox
#Themimic
#Camerabobble