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 » Scripters
Home Search
 

lookVector isn't working?

Previous Thread :: Next Thread 
MahouReikon is not online. MahouReikon
Joined: 15 Feb 2014
Total Posts: 1359
24 Dec 2015 11:34 AM
local p = game.Players.LocalPlayer
repeat wait() until p.Character
local c = p.Character

local x = game.Lighting.Block:Clone()
x.Parent = game.Workspace
x.CFrame = c.Torso.CFrame + (c.Torso.CFrame.lookVector * Vector3.new(0, 0, 5))

even if I turn the block still spawns in same spot


The Legend of Heroes
Report Abuse
wonderful72pike is not online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
24 Dec 2015 11:38 AM
Because you're adding a vector, which uses an axis, it will always move the same way. Try this:

local p = game.Players.LocalPlayer
repeat wait() until p.Character
local c = p.Character

local x = game.Lighting.Block:Clone()
x.Parent = game.Workspace
x.CFrame = c.Torso.CFrame + (c.Torso.CFrame.lookVector * 5)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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