generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why does camera manipulation only works in Solo mode?

Previous Thread :: Next Thread 
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
09 Mar 2015 02:32 PM
Lately I've been experimenting some camera manipulation but sadly it only works in Solo mode. What it does is to check the name of a button and after that it searches in an folder a camera with the same name, then, after that, it changes the property of the CurrentCamera to the camera choosen. The properties changed are CoordinateFrame, Focus and FieldOfView.

Now, when I test it in Solo mode it works, but when I go to my ALT's place to test it, it doesn't works. Is this a roblox update?
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
09 Mar 2015 02:40 PM
Make it a LocalScript
Report Abuse
FalconLoverGiraffe is not online. FalconLoverGiraffe
Joined: 24 Jun 2014
Total Posts: 456
09 Mar 2015 02:47 PM
lol yeah make it a local script bruh
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 07:45 AM
Lol yeah it's obv a localscript. I am not like some that thinks that CurrentCamera exists for the whole server. I need the client's scope bruh
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 08:34 AM
pbumpp
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 09:43 AM
bump [1]
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Mar 2015 11:27 AM
Top of the LocalScript:
repeat wait() until game.Players.LocalPlayer.Character
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 12:06 PM
@epicbreaker

Still doesn't works, already tried:

-repeat wait() until game.Players.LocalPlayer.Character

-while not game.Players.LocalPlayer.Character do wait() end

-game.Players:WaitForChild("Character") -- yup this one didn't even work
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Mar 2015 12:22 PM
Character is a property, not a child..

Also, post your script.
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 12:45 PM
It is a bit too long, but if you want so...

repeat wait() until game.Players.LocalPlayer.Character
wait(1)

local plr = game.Players.LocalPlayer
local curcam = game.Workspace.CurrentCamera
local monitor = false
local button = script.Parent:FindFirstChild("Toggle")
local cameras = game.ReplicatedStorage:FindFirstChild("Cameras")
local gui = script.Parent:FindFirstChild("MonitorScheme")
local choices = gui:FindFirstChild("Choices")

local currentCamera = nil
local lastCamera = choices.MainCorridor

function changeCamera(node)
if lastCamera == node then return end
if node and cameras:FindFirstChild(node.Name) then
lastCamera = node
currentCamera = node
ccam = cameras:FindFirstChild(node.Name)
curcam.CameraType = "Scriptable"
curcam.CoordinateFrame = ccam.CoordinateFrame
curcam.Focus = ccam.Focus
end
end

function onToggled()
if not monitor then
monitor = true
gui.Visible = true
changeCamera(lastCamera)
else
monitor = false
gui.Visible = false
currentCamera = nil

curcam.CameraType = "Custom"
curcam.CameraSubject = plr.Character:FindFirstChild("Humanoid")
curcam.FieldOfView = 70
end
end

function init()
for _, c in pairs(choices:GetChildren()) do
if c:IsA("TextButton") then
c.MouseButton1Down:connect(c)
end
end
end

init()
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Mar 2015 12:53 PM
Press F9 in-game, what's the error?
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 12:54 PM
Funny thing is, no errors. Not in Client-Side, nor in Server-Side.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Mar 2015 12:56 PM
There should be.

Your variables are using :FindFirstChild(), instead of :WaitForChild()
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 01:00 PM
Well, I've already confronted problems with my scripts not finding it's contents inside the GUI. But anyways, I'll try and see if it works.
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 01:32 PM
No, no progress
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Mar 2015 01:34 PM
Try printing when you click the button. (In online)
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 01:36 PM
Click Detection works, but cameras still don't change.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Mar 2015 01:36 PM
Are you sure?
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 01:37 PM
*With both MouseButton1Down and MouseButton1Click
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 01:55 PM
I mean, with the two Events tested.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Mar 2015 02:05 PM
In online mode?
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 02:10 PM
Yes.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
10 Mar 2015 02:56 PM
if lastCamera == node then return end

You are literally passing lastCamera into node, so lastCamera will always equal node.
Report Abuse
LucasLua is not online. LucasLua
Joined: 18 Jun 2008
Total Posts: 7386
10 Mar 2015 03:04 PM
Also change

curcam.CoordinateFrame = ccam.CoordinateFrame
curcam.Focus = ccam.Focus

to

curcam.CoordinateFrame = CFrame.new(ccam.CoordinateFrame.p, ccam.Focus.p)


There is a bug with the Scriptable CameraType where Focus does not behave properly.
Report Abuse
lucas200206 is not online. lucas200206
Joined: 06 Dec 2009
Total Posts: 899
10 Mar 2015 06:20 PM
@epic

I removed that. Thanks for the tip.

@lucas

Nope, that didn't worked on online but on solo did (as always)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image