Advertisement
DrawingJhon

Untitled

Aug 3rd, 2020 (edited)
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1. --local camera = workspace.CurrentCamera
  2.  
  3. local part = Instance.new("Part", workspace)
  4. part.Name = "CamPro"
  5. part.Anchored = true
  6. part.CanCollide = false
  7. --[[local bodyPos = Instance.new("BodyPosition", part)
  8. bodyPos.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  9. local bodyGyro = Instance.new("BodyGyro", part)
  10. bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)]]
  11.  
  12. local remote = Instance.new("RemoteEvent", part)
  13. remote.Name = "REE"
  14. remote.OnServerEvent:Connect(function(plr, wht, data)
  15.     if plr ~= owner then return end
  16.     if wht == "cf" then
  17.         --[[bodyPos.Position = Vector3.new(data.X, data.Y, data.Z)
  18.         bodyGyro.CFrame = data]]
  19.         part.CFrame = data
  20.     end
  21. end)
  22.  
  23. NLS([==[local part = workspace:WaitForChild("CamPro")
  24. local remote = part:WaitForChild("REE")
  25. local cam = workspace.CurrentCamera
  26. game:GetService("RunService").RenderStepped:Connect(function()
  27.     remote:FireServer("cf", cam.CFrame)
  28. end)]==], owner.Character)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement