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: Turret Camera

Previous Thread :: Next Thread 
sterkte is not online. sterkte
Joined: 01 Jul 2013
Total Posts: 854
13 Oct 2014 06:15 AM
Okay so, I have this turret in an airplane and I'd like to make the tool script give you a Camera mode that isn't blocked by blocks or other objects, this is what I tried to do I'm not sure were I should put it or how to.

function onB1D(mouse)
wait() or Game.Workspace.Camera.CameraType = Watch -- !my add on! not sure what to use instead of or
if mouse.Target.Parent ~= script.Parent.Vehicle.Value and mouse.Target.Parent.Parent ~= script.Parent.Vehicle.Value then
script.Parent.Vehicle.Value.Gun.Fire:play()
bull = Instance.new("Part")
bull.Parent = game.Workspace
bull.CFrame = CFrame.new((mouse.Hit.p + script.Parent.Vehicle.Value.Gun.Position)/2,script.Parent.Vehicle.Value.Gun.Position)
bull.CanCollide = false
bull.BrickColor = BrickColor.new(21)
bull.Anchored = true
bull.Transparency = 0.5
bull.Size = Vector3.new(1,1.2,1)
mesher = Instance.new("BlockMesh")
mesher.Parent = bull
mesher.Scale = Vector3.new(0.4, 0.4, (mouse.Hit.p - script.Parent.Vehicle.Value.Gun.Position).magnitude)
script.Cle:clone().Parent = bull
ex = Instance.new("Explosion")
ex.BlastRadius = 1
ex.BlastPressure = 50
ex.Position = mouse.Hit.p
ex.Parent = game.Workspace
end
end


function onSele(mouse)
mouse.Button1Down:connect(function() onB1D(mouse) end)
mouse.Icon = "http://www.roblox.com/asset/?id=10722913"
end

script.Parent.Selected:connect(onSele)
Report Abuse
sterkte is not online. sterkte
Joined: 01 Jul 2013
Total Posts: 854
13 Oct 2014 02:23 PM
bump
Report Abuse
sterkte is not online. sterkte
Joined: 01 Jul 2013
Total Posts: 854
13 Oct 2014 02:30 PM
(PS) The script works I just need help on making the camera not be blocked by bricks as well.
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