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
 

Spectate Gui script works for only a second

Previous Thread :: Next Thread 
tinarg is online. tinarg
Joined: 18 Jun 2010
Total Posts: 4925
21 Jun 2014 06:16 PM
I made a click-activated spectate Gui. When you click it, it only refocuses the camera for a second before reverting it. What's going on?

Here's the code:

--Scripted by tinarg


function onButtonClicked()

local cam = workspace.CurrentCamera
cam.CameraSubject = game.Workspace:findFirstChild(game.Workspace.PlayerMonster.Value).Torso

end
script.Parent.MouseButton1Click:connect(onButtonClicked)

Thanks!
Report Abuse
tinarg is online. tinarg
Joined: 18 Jun 2010
Total Posts: 4925
21 Jun 2014 06:25 PM
bump
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
21 Jun 2014 06:28 PM
Maybe there's another script or part of the same script that constantly 'fixes' the camera?
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
21 Jun 2014 06:28 PM
Nooo, I forgot to add my thing :C

I would appreciate it if you came to my place and donate some robux! Thanks!
Report Abuse
tinarg is online. tinarg
Joined: 18 Jun 2010
Total Posts: 4925
21 Jun 2014 06:31 PM
there's nothing, to my knowledge, that "fixes" the camera.
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
21 Jun 2014 06:34 PM
Local script?

I would appreciate it if you came to my place and donate some robux! Thanks!
Report Abuse
tinarg is online. tinarg
Joined: 18 Jun 2010
Total Posts: 4925
21 Jun 2014 06:35 PM
it's a local script, and I think I know what's wrong... The cutscene script might continue to fix the camera after it's removed... I'm rewriting the script to avoid this.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
21 Jun 2014 06:36 PM
function onButtonClicked()

local cam = workspace.CurrentCamera
cam.CameraSubject = game.Workspace:findFirstChild(game.Workspace.PlayerMonster.Value).Torso
repeat wait() until game.Workspace:findFirstChild(game.Workspace.PlayerMonster.Value).Torso
end
script.Parent.MouseButton1Click:connect(onButtonClicked)
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