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 DOESN'T WORK NO MATTER WHAT!

Previous Thread :: Next Thread 
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
16 Feb 2012 06:36 PM
Script:

script.Parent.Touched:connect(function(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if human then
script.LocalScript:clone().Parent = character
end
end)

LocalScript:

local cam = Workspace.CurrentCamera
cam.CoordinateFrame=CFrame.new(-0.9998, 47.8, 40)
cam.Focus=CFrame.new(-26, 0.9999, 39.5)
wait(1)
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"
end

I put the local script in the script and put the script in a spawn. When I touched it. It still put the camera focusing on the character.


No output cuz output didn't say a single thing.
Report Abuse
tiger33333321 is not online. tiger33333321
Joined: 28 Mar 2010
Total Posts: 2115
16 Feb 2012 06:37 PM
"if human then "

something's wrong there

http://www.roblox.com/My/Groups.aspx?gid=80738
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
16 Feb 2012 06:38 PM
@Tiger

No, nothing's wrong with that.

† KMXD †
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
16 Feb 2012 06:40 PM
script.Parent.Touched:connect(function(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if human then
script.LocalScript:clone().Parent = character -- never defined character here
end
end)

Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
16 Feb 2012 06:41 PM
Character is the player who touched it.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
16 Feb 2012 06:42 PM
In the script you provided, you never defined it.

† KMXD †
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
16 Feb 2012 06:43 PM
script.Parent.Touched:connect(function(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if human then
script.LocalScript:clone().Parent = hit.Parent
end
end)

Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
16 Feb 2012 06:47 PM
Output says this:

Workspace.monkey1589.LocalScript:7: 'eof' expected near 'end'
Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
16 Feb 2012 07:09 PM
Why no one reply?
Report Abuse
CrasyTrex is not online. CrasyTrex
Joined: 13 Mar 2011
Total Posts: 761
16 Feb 2012 07:14 PM
I belive that means you need to add a end to that line I might be wrong.
Report Abuse
monkey1589 is not online. monkey1589
Joined: 06 Feb 2010
Total Posts: 2334
16 Feb 2012 07:17 PM
Still the same error.
Report Abuse
CrasyTrex is not online. CrasyTrex
Joined: 13 Mar 2011
Total Posts: 761
16 Feb 2012 07:24 PM
It might mean there is no needed end.
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
16 Feb 2012 07:40 PM
no ed needed here:
local cam = Workspace.CurrentCamera
cam.CoordinateFrame=CFrame.new(-0.9998, 47.8, 40)
cam.Focus=CFrame.new(-26, 0.9999, 39.5)
wait(1)
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"
end

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