MrClayPot
|
  |
| Joined: 28 Jun 2015 |
| Total Posts: 589 |
|
|
| 15 Aug 2015 01:20 PM |
for free!
Toilet paper makes my booty happy シ |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2015 01:21 PM |
game.Players.LocalPlayer.Camera.CameraMode = Enum.CameraMode.LockFirstPerson
while true do the do |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 15 Aug 2015 01:23 PM |
-- local script in starrterplayerscripts
local plr = game.Players.LocalPlayer plr.CameraMode = Enum.CameraMode.LockFirstPerson
|
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 15 Aug 2015 01:24 PM |
| this is why i should stop using internet explorer |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2015 01:25 PM |
| Just set StarterPlayer.CameraMaxZoomDistance to 0.5 |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2015 01:26 PM |
Chrome is the best, dont use: Microsoft Edge, Internet Explorer, Opera, Safer Browser. Safer browser was malware that i got.
lol m8 |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
|
| 15 Aug 2015 01:34 PM |
"Can somone make me a fist person only script"
What, you don't want to fist a pig? |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
| |
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 15 Aug 2015 01:36 PM |
Put this code in a module script named CustomCamera
local cam = workspace.CurrentCamera local Input = game:GetService("UserInputService") local player = game.Players.LocalPlayer
local Cinematic = 0 local CinematicKey = Enum.KeyCode.BackSlash
local module = {}
module.Enabled = false module.Controllable = true module.camRangeX = Vector2.new(-180,181) module.camRangeY = Vector2.new(-80,80)
module.ShakeScale = 0 module.Smoothing = 1.6 module.RollScale = 0.6 module.BobbingScale = 0.175 module.BobbingTime = 0.15 module.Moving = false local BobbingMod = 0
module.delta3 = Vector3.new() module.camSubject = nil module.camSubjectOffset = CFrame.new(0,1.5,0.25)
module.SetEnabled = function(state) if module.Enabled and not state then cam.CameraType = "Custom" elseif not module.Enabled and state then cam.CameraType = "Scriptable" end module.Enabled = state end
player.CharacterAdded:connect(function() module.camSubject = player.Character:WaitForChild("HumanoidRootPart") end)
local ragdoll = nil local function connectDeath() player.Character:WaitForChild("Humanoid").Died:connect(function() local iter = 0 ragdoll = nil while iter < 30 do ragdoll = workspace.ragdolls:FindFirstChild(player.Name) iter = iter + 1 if ragdoll then iter = 31 end wait() end if ragdoll then cam.CameraSubject = ragdoll:FindFirstChild("Humanoid") cam.CameraType = "Custom" end wait(0.1) while player.Character:WaitForChild("Humanoid").Health <= 0 do wait() end for i,v in pairs(ragdoll:GetChildren()) do if v.ClassName == "Part" and v.Name ~= "Part" then v.Transparency = 0 elseif v.ClassName == "Hat" then v.Handle.Transparency = 0 end end ragdoll = nil cam.CameraSubject = player.Character.Humanoid cam.CameraType = "Scriptable" connectDeath() end) end connectDeath()
local RollVelocity = 0 Input.InputChanged:connect(function(inputObject) if inputObject.UserInputType == Enum.UserInputType.MouseMovement or inputObject.UserInputType == Enum.UserInputType.Touch then RollVelocity = RollVelocity - module.delta3.x/20 module.delta3 = module.delta3 + Vector3.new(inputObject.Delta.x,inputObject.Delta.y,0) * 0.275 if math.abs(module.camRangeX.x) + math.abs(module.camRangeX.y) <= 360 then if module.delta3.x > module.camRangeX.y then module.delta3 = Vector3.new(module.camRangeX.y, module.delta3.y) elseif module.delta3.x < module.camRangeX.x then module.delta3 = Vector3.new(module.camRangeX.x, module.delta3.y) end end if module.delta3.y > module.camRangeY.y then module.delta3 = Vector3.new(module.delta3.x,module.camRangeY.y) elseif module.delta3.y < module.camRangeY.x then module.delta3 = Vector3.new(module.delta3.x,module.camRangeY.x) end RollVelocity = RollVelocity + module.delta3.x/20 end end)
Input.InputEnded:connect(function(inputObject) if inputObject.KeyCode == CinematicKey then Cinematic = Cinematic + 1 if Cinematic == 1 then player.PlayerGui.LocalEvents.Message:Fire([[Cinematic mode 1; Use "\" to switch mode.]],Color3.new(1,1,0.6)) module.Smoothing = module.Smoothing + 8 elseif Cinematic == 2 then player.PlayerGui.LocalEvents.Message:Fire([[Cinematic mode 2]],Color3.new(1,1,0.6)) module.Smoothing = module.Smoothing + 8 elseif Cinematic == 3 then player.PlayerGui.LocalEvents.Message:Fire([[Cinematic mode 3]],Color3.new(1,1,0.6)) module.Smoothing = module.Smoothing - 12 module.RollScale = module.RollScale + 1.4 elseif Cinematic == 4 then player.PlayerGui.LocalEvents.Message:Fire([[Cinematic mode 4]],Color3.new(1,1,0.6)) module.ShakeScale = module.ShakeScale + 0.05 module.RollScale = module.RollScale + 2 module.Smoothing = module.Smoothing - 4.6 else player.PlayerGui.LocalEvents.Message:Fire([[Cinematic mode off]],Color3.new(1,1,0.6)) Cinematic = 0 module.Smoothing = module.Smoothing + 0.6 module.RollScale = module.RollScale - 3.4 module.ShakeScale = module.ShakeScale - 0.05 end end end)
local smoothDelta = Vector3.new() local SmoothRoll = 0 local oldHeadCFrame = nil local ragdollStep = 0 local maxStep = 6 local ang, interpolateFunc = nil, nil
local function CameraStep() if module.Enabled then if ragdoll then local headCFrame = nil if ragdoll:FindFirstChild("Head") then headCFrame = ragdoll.Head.CFrame if oldHeadCFrame ~= nil then cam.CoordinateFrame = oldHeadCFrame else cam.CoordinateFrame = headCFrame end if headCFrame ~= oldHeadCFrame then ang, interpolateFunc = CFrameInterpolate(cam.CoordinateFrame,headCFrame) ragdollStep = 0 oldHeadCFrame = headCFrame end if ragdollStep < maxStep then ragdollStep = ragdollStep + 1 else ragdollStep = maxStep end if interpolateFunc then cam.CoordinateFrame = interpolateFunc(ragdollStep/maxStep) else cam.CoordinateFrame = headCFrame end end else BobbingMod = module.Moving and BobbingMod + (1-BobbingMod)/5 or BobbingMod + (0-BobbingMod)/5 RollVelocity = RollVelocity/8 SmoothRoll = SmoothRoll + (RollVelocity - SmoothRoll)/8 oldHeadCFrame = nil ragdollStep = 0 ang, interpolateFunc = nil, nil if module.camSubject then smoothDelta = smoothDelta + (module.delta3 - smoothDelta)/(module.Smoothing + 1) + Vector3.new( math.random(-10,10)*module.ShakeScale, math.random(-10,10)*module.ShakeScale, 0 ) local smoothVector = Vector3.new(math.cos(math.rad(smoothDelta.x))/2,0,math.sin(math.rad(smoothDelta.x))/2) if player.Character:FindFirstChild("HumanoidRootPart") then player.Character.HumanoidRootPart.CFrame = CFrame.new( player.Character.HumanoidRootPart.CFrame.p, smoothVector + player.Character.HumanoidRootPart.CFrame.p ) end local pos = module.camSubject:GetRenderCFrame():pointToWorldSpace(module.camSubjectOffset.p + Vector3.new( math.cos(tick()/module.BobbingTime)*module.BobbingScale*BobbingMod/2, -math.cos(tick()*2/module.BobbingTime)*module.BobbingScale*BobbingMod, 0 )) local smoothRotation = math.rad(smoothDelta.y) local desiredPosition = module.camSubject:GetRenderCFrame():pointToWorldSpace(module.camSubjectOffset.p) cam.CoordinateFrame = CFrame.new(pos,smoothVector + pos) * CFrame.fromAxisAngle(Vector3.new(1,0,0),-smoothRotation) * CFrame.Angles( 0, 0, SmoothRoll*module.RollScale - math.cos(tick()/module.BobbingTime)*module.BobbingScale*BobbingMod*0.04 ) end end else end end game:GetService("RunService"):BindToRenderStep("CameraStep",500,CameraStep)
module.camSubject = player.Character:WaitForChild("HumanoidRootPart")
return module
|
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 15 Aug 2015 01:37 PM |
Put this in a local script in player gui
local CustomCamera = require(game.ReplicatedStorage.CustomCamera) local runService = game:GetService("RunService") local Input = game:GetService("UserInputService") local Players = game:GetService("Players")
local Camera = workspace.CurrentCamera local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:wait() local Head = Character:WaitForChild("Head")
Player.CameraMode = "LockFirstPerson" game:GetService("UserInputService").MouseBehavior = "LockCenter" CustomCamera.SetEnabled(true)
game:GetService("RunService").RenderStepped:connect(function() for Interation, Part in pairs(Character:GetChildren()) do if Part:IsA("BasePart") then Part.LocalTransparencyModifier = 1 elseif Part.ClassName == "Hat" then Part.Handle.LocalTransparencyModifier = 1 end end end)
local function ConnectCharacter() Player.Character:WaitForChild("Humanoid").Running:connect(function(stat) if stat > 5 then CustomCamera.Moving = true CustomCamera.BobbingScale = stat/75 else CustomCamera.Moving = false end end) end
Player.CharacterAdded:connect(ConnectCharacter) ConnectCharacter() |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
| |
|
| |
|
|
| 15 Aug 2015 01:45 PM |
| i dont think he wanted a system dev xD |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 15 Aug 2015 01:46 PM |
| That is a system mate, kick arse looking and immersive one too |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2015 01:47 PM |
@dev
unnecessary code but ok |
|
|
| Report Abuse |
|
|
MrClayPot
|
  |
| Joined: 28 Jun 2015 |
| Total Posts: 589 |
|
|
| 15 Aug 2015 01:58 PM |
im confused like guys im like a dumb a** 5yr old explain it better pls
Toilet paper makes my booty happy シ |
|
|
| Report Abuse |
|
|
MrClayPot
|
  |
| Joined: 28 Jun 2015 |
| Total Posts: 589 |
|
|
| 15 Aug 2015 02:03 PM |
that crap script doesnt work u liar
Toilet paper makes my booty happy シ |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2015 02:05 PM |
| Open explorer. Open properties. Click StarterPlayer. Open Camera Type. Hit First Peron. Done. No script needed. |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 15 Aug 2015 02:12 PM |
| Take the first block of code and paste into a module script in replicated first, name that script CustomCamera |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 15 Aug 2015 02:14 PM |
| Seconded code block goes into a local script I'm starter gui |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2015 03:08 PM |
| Why do people complain about "force feeding scripts" when everyone who complains about it also seems to encourage it? |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 15 Aug 2015 03:15 PM |
| @long who are you directing that? |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2015 03:17 PM |
| You guys are over complicating things. This literally doesn't even require scripting. Just click on StarterPlayer in the Explorer window, then in the Properties window set CameraMode to LockFirstPerson. |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 15 Aug 2015 03:18 PM |
| @above, we gotta pump him out |
|
|
| Report Abuse |
|
|