|
| 27 Nov 2015 09:26 AM |
I am a starter scripter and I joined a friend game and I saw something really amazing, he made the camera like neon, it glows and its actually a camera, I think its camera multiplation. Can someone tell me the script to how to make it neon like he did ;-;? and what is the process.
;-; |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:32 AM |
The Camera is not a physical object, it cannot have materials.
Unless perhaps you mean he positioned a Part in front of the camera, in which case you have your answer. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:33 AM |
| Yes Jarod thats what I mean, how to do it? |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:34 AM |
Just use CFrames to put a Part in front of the Camera. Part.CFrame = Camera.CoordinateFrame * CFrame.new(0, 0, -2) |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:35 AM |
| but how do I make it follow my camera? |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:37 AM |
Put it in a loop, or preferably use RenderStepped.
game:GetService("RunService").RenderStepped:connect(function() -- Position the part here end) |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:41 AM |
ok so thats basically the script:
game:GetService("RunService").RenderStepped:connect(function() Part.CFrame = Camera.CoordinateFrame * CFrame.new(0, 0, -2) end)
and if I want to make it neon so itll be like this right?:
game:GetService("RunService").RenderStepped:connect(function() Part.CFrame = Camera.CoordinateFrame * CFrame.new(0, 0, -2) end)
game.Workspace.Part.Material = "Neon" |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:42 AM |
| Yeah, more or less. Of course, you still need to define Part and Camera, and you will need to create it in the LocalScript so that nobody else can see it, and everyone has their own. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:49 AM |
I inserted a Part to Workspace and yes its called: Part I did this script:
game:GetService("RunService").RenderStepped:connect(function() Part.CFrame = Camera.CoordinateFrame * CFrame.new(0, 0, -2) end)
game.Workspace.Part.Material = "Neon"
in a local script and it didnt work :c. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:56 AM |
Some variables was not defined, but since the objects is placed in workspace you just need to add game.Workspace infront and Camera could be changed to CurrentCamera to make sure it gets the correct camera.
Here is an fixed version:
game:GetService("RunService").RenderStepped:connect(function() game.Workspace.Part.CFrame = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(0, 0, -2) end)
game.Workspace.Part.Material = "Neon" |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 09:57 AM |
| Because you still didn't define Part and Camera, which are used on line 2. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 10:02 AM |
Ok look.
game:GetService("RunService").RenderStepped:connect(function() game.Workspace.Part.CFrame = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(0, 0, -2) end)
game.Workspace.Part.Material = "Neon"
This is the script but it doesnt work I dont know why, yes I did it in LocalScript and inserted a part to workspace (The part in workspace isnt anchored or welded) |
|
|
| Report Abuse |
|
|
| |
|