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: Would this work?

Previous Thread :: Next Thread 
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
30 Nov 2012 10:55 PM
game.Players.PlayerAdded:connect(function(player)
script.LocalScript:clone().Parent = player.CharacterAdded:wait()
end)



In Local:


local camera=workspace.CurrentCamera
camera.CameraSubject = Workspace.Part1
camera.CameraType = "Attach"
end

game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"


Camera Manipulation yay
Report Abuse
SpleenYanks is not online. SpleenYanks
Joined: 24 Aug 2008
Total Posts: 921
30 Nov 2012 11:08 PM
game.Players.PlayerAdded:connect(function(player)
script.LocalScript:clone().Parent = player.CharacterAdded:wait()
end)
Nu.
local Orig = script.LocalScript:clone() --Cause of that weird LS glitch
game:service("Players").PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
coroutine.wrap(function()
repeat wait() until Character:findFirstChild("Head") ~= nil
local Derp = Orig:clone()
Derp.Parent = Character.Head
end)()
end)
end)
Report Abuse
crazytomato4 is not online. crazytomato4
Joined: 09 Feb 2011
Total Posts: 1368
30 Nov 2012 11:12 PM
Pretty sure that LocalScripts don't work inside the Character, since the Character isn't local to your client. Just put it in the Player and wait for the character to load before doing anything.
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
30 Nov 2012 11:45 PM
@crazy, then explain why the Animation localscript works in your character.
Report Abuse
crazytomato4 is not online. crazytomato4
Joined: 09 Feb 2011
Total Posts: 1368
30 Nov 2012 11:52 PM
my mistake, apparently it does work in the character. i haven't been on this site in a while, so i forgot a few things. sorry :)
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