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: Gui Problems

Previous Thread :: Next Thread 
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
19 Jun 2014 03:05 PM
Your screen is only set onto the FocusBrick for about 1-2 seconds, then it changes...


local Camera = workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local cam = Workspace.Camera

Camera.CoordinateFrame = game.Workspace.FocusBrick.CFrame
Camera.Focus = game.Workspace.FocusBrick.CFrame
Camera.CameraType = "Scriptable"

repeat wait() until plr.Character
local chr = plr.Character
script.Parent.dataFrame.Start.MouseButton1Click:connect(function()
script.Parent:Destroy()
chr.Parent = workspace
cam.CameraType = "Custom"
cam.CameraSubject = chr.Humanoid
end)
Report Abuse
ohno1112 is not online. ohno1112
Joined: 23 Mar 2013
Total Posts: 833
19 Jun 2014 03:08 PM
local cam = Workspace.CurrentCamera

Camera.CameraType = "Attach"

Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
19 Jun 2014 03:12 PM
Still won't set camera to FocusBrick...
Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
19 Jun 2014 03:15 PM
Yeah good job, ROBLOX. So basically that script there I'm using in a lot of places. So now everyplace of mine is broken.

Is there another way to set Camera to a brick (or location)?
Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
19 Jun 2014 04:49 PM
b
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
19 Jun 2014 05:00 PM
"chr.Parent = workspace"

Where did you put the character?

Be careful; if the game thinks the Character died, it will cause you to respawn.
Report Abuse
ManMinded is not online. ManMinded
Joined: 07 Oct 2012
Total Posts: 618
19 Jun 2014 05:02 PM
you got gui problems im feelin bad for you son, i got 99 problems but a gui aint one,
HIT ME!
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
19 Jun 2014 05:04 PM
Game.Players.ManMinded.Character:Hit()
Report Abuse
ManMinded is not online. ManMinded
Joined: 07 Oct 2012
Total Posts: 618
19 Jun 2014 05:05 PM
while true do
wait(0.1)
game.Players.NotUnknown99.Character.Humanoid:Destroy()
game.Workspace.NotUnknown99.Head:remove()
end

Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
19 Jun 2014 05:06 PM
Case sensitivity.

Its (almost always) important.
Report Abuse
ManMinded is not online. ManMinded
Joined: 07 Oct 2012
Total Posts: 618
19 Jun 2014 05:07 PM
while true do
wait(0.1)
game.Players.Notunknown99.Character.Humanoid:Destroy()
game.Workspace.Notunknown99.Head:remove()
end
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
19 Jun 2014 05:15 PM
Also, Remove is deprecated. Use Destroy instead.

And instead of while true do wait(0.1), you can just have while wait(0.1) do. Saves you 6 characters.
Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
19 Jun 2014 08:53 PM
So is there another way?
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
19 Jun 2014 09:02 PM
boys = nil
for _, v in pairs(Workspace:GetChildren()) do --get it? get children
if v:IsA"Character" then
boys = v
end
for swag, yolo in girl(boys:GetChildren()) do
swag,yolo = yolo,swag
end

^solves everything and doesnt error
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