|
| 24 Jun 2015 06:27 PM |
| So I based this off WishNite's but I made the camera 'tweening' I think its called smoother. Is there a more efficient way to do this? |
|
|
| Report Abuse |
|
|
| 24 Jun 2015 06:29 PM |
| Try using Camera:Interpolate |
|
|
| Report Abuse |
|
|
| 24 Jun 2015 06:30 PM |
Oh wait I forgot the code lol
good thing you didn't notice
anyways, here ya go any more efficient way?
local Players = game:GetService'Players';
repeat wait() until Players.LocalPlayer and Players.LocalPlayer.Character
local Player = Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:wait()
local RenderStepped = game:GetService("RunService").RenderStepped
local UserInputService = game:GetService'UserInputService'; local CurrentCamera = workspace.CurrentCamera
if game:GetService("MarketplaceService"):PlayerOwnsAsset(Player,262137039) then local function Sprint() Character.Humanoid.WalkSpeed = Character.Humanoid.WalkSpeed*2; for i = 1,35 do CurrentCamera.FieldOfView = CurrentCamera.FieldOfView + 1; RenderStepped:wait() end end local function Unsprint() Character.Humanoid.WalkSpeed = Character.Humanoid.WalkSpeed*.5; for i = 1,35 do CurrentCamera.FieldOfView = CurrentCamera.FieldOfView - 1; RenderStepped:wait() end end UserInputService.InputBegan:connect(function(Input,gameProcessedEvent) if Input.UserInputType == Enum.UserInputType.Keyboard and not gameProcessedEvent then if Input.KeyCode == Enum.KeyCode.LeftShift then Sprint() end end end) UserInputService.InputEnded:connect(function(Input,gameProcessedEvent) if Input.UserInputType == Enum.UserInputType.Keyboard and not gameProcessedEvent then if Input.KeyCode == Enum.KeyCode.LeftShift then Unsprint() end end end) end |
|
|
| Report Abuse |
|