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 » Scripting Helpers
Home Search
 

Re: This works in test mode but not play mode?

Previous Thread :: Next Thread 
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 01:59 PM
In test mode:
s = game.Workspace.StageOneScript:Clone()
s.Parent = game.Workspace
s.Disabled = false
player.PlayerGui.StageOne.Frame.Visible = true
--Activates a script thats disabled and makes a gui visible

local target = workspace.StageOne
local camera = workspace.CurrentCamera
camera.CameraSubject = target
local angle = 0

while wait() do
camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part
* CFrame.Angles(-25, angle, 0) --Rotate by the angle
* CFrame.new(0, 0, -5) --Move the camera backwards 5 units
angle = angle + math.rad(1)
end
--Moves the camera around the part in workspace named "StageOne"

function onclick()
script.Parent.Parent.Visible = false
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"

end

script.Parent.MouseButton1Down:connect(onclick)
--Returns camera to player and removes gui, however the camera doesnt move correctly

In play mode:
Nothing happens :/

Any help with why it doesnt work in play mode, and how to fix the camera in the third code?
Report Abuse
leolion113 is not online. leolion113
Joined: 11 Oct 2008
Total Posts: 3336
10 Apr 2012 02:04 PM
"player.PlayerGui.StageOne.Frame.Visible = true"

I don't see the 'player' variable classified anywhere.
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 02:07 PM

function touchorwhatever(hit)
player = game.Players:findFirstChild(hit.Parent.Name)
--moar codes
--code from forum
--a bunch of ends
--connect function
Report Abuse
leolion113 is not online. leolion113
Joined: 11 Oct 2008
Total Posts: 3336
10 Apr 2012 02:08 PM
Are you using a LocalScript?
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 02:09 PM
the only local script is the last code, the first two are just scripts
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 02:26 PM
SHOULD it be in a local script?
Report Abuse
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
10 Apr 2012 02:44 PM
I'm spamming, but Iv'e been waiting 2 days for someone to fix this:
http://www.roblox.com/Forum/ShowPost.aspx?PostID=66011112
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 02:58 PM
Ill fix yours if you fix mine :3
Report Abuse
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
10 Apr 2012 03:03 PM
I'm not good enough for that, sorry :(
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 03:37 PM
My problem still hasnt been solved...
Report Abuse
pighead10 is not online. pighead10
Joined: 03 May 2009
Total Posts: 10341
10 Apr 2012 03:46 PM
workspace.CurrentCamera can only be used if the script is a LocalScript.
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 03:49 PM
oh, so localscript = good :D
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 03:55 PM
It still didnt do anything to my camera, but the frame for the gui part worked...
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 04:21 PM
bump, the localscript didnt work
Report Abuse
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
10 Apr 2012 04:24 PM
Fix mine and i'll PM some friends(offline ATM) to help.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
10 Apr 2012 04:30 PM
@Noah

Yeah right >.>
Report Abuse
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
10 Apr 2012 04:31 PM
Yeah right D:
Someone should really help me out here.
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
10 Apr 2012 04:50 PM
Dont spam other people's help requests...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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