DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 24 Mar 2016 02:25 PM |
Hey, I took a long break from this game and am looking to get back into scripting. I know most of the basics, and some advanced stuff, but I've been trying to create a local brick. I couldn't find a tutorial or any documentation on how to make one, so I found a free model and tried to go from there. It worked, however the issue is whenever I zoom in, the brick matches the transparency of my player. eg, fully zoomed in = invisible brick
I have a vague idea why this is happening, but have no idea how to fix it. I was hoping someone could help me with it.
The script is just a regular script with a local script within it. I'll paste the code here.
Script: script.LocalScript:clone().Parent = workspace.Player1
LocalScript: m = Instance.new("Message") m.Parent = script.Parent p = Instance.new("Part") p.Parent = m p.Position = Vector3.new(0,3,0) p.Size = Vector3.new(5,1,5) p.Anchored = true
Thanks in advance! |
|
|
| Report Abuse |
|
|
LuaLlama
|
  |
| Joined: 25 Jan 2014 |
| Total Posts: 1123 |
|
|
| 24 Mar 2016 02:30 PM |
You can turn FE on, and the parts created in local scripts will only replicate to the client. Although, you have been out of the lua game for a while, so I would use this method, using a localscript parent your part to your camera.
I would STRONGLY recommend that you learn how to convert your place to a FE compatible environment, as this will protect against hackers. Ether way, using this (http://www.roblox.com/NoCheat-V-1-3-item?id=301225549) will protect your place even more. |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 24 Mar 2016 02:38 PM |
| Hey, thanks I'll do that. I'm assuming that the player camera is the thumbnailcamera, right? |
|
|
| Report Abuse |
|
|
LuaLlama
|
  |
| Joined: 25 Jan 2014 |
| Total Posts: 1123 |
|
|
| 24 Mar 2016 05:08 PM |
No, thats just part of the model. I ment for example:
local cam = game.Workspace.CurrentCamera
local Part = Instance.new("Part", cam)
--In Local Script |
|
|
| Report Abuse |
|
|
|
| 24 Mar 2016 05:09 PM |
Parent parts into workspace.CurrentCamera
Dont hate, motivate. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 24 Mar 2016 05:10 PM |
| Filtering Enabled is your best solution. Do not be intimidated by some of the restrictions it causes. |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 24 Mar 2016 07:05 PM |
| I appreciate the help, but how is this local? I thought local is when it is only visible to one player? If it's in the currentcamera it's visible to every player, right? |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
| |
|
|
| 24 Mar 2016 07:48 PM |
CurrentCamera is a local variable that only exists on the client, just like the CurrentPlayer variable.
If you have FilteringEnabled you won't need to do any of that hacky 'parts inside a message' stuff. Just make a part with a local script.
If you want to know why that works, read up on server/client models
http://wiki.roblox.com/index.php?title=FilteringEnabled_with_the_Client-Server_Model
http://wiki.roblox.com/index.php?title=API:Class/Workspace/FilteringEnabled |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 24 Mar 2016 07:59 PM |
| Thanks. A little confused, but I'll read into it. |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 24 Mar 2016 08:52 PM |
| Well, I tried it, and nothing changed. I thought there would be a more simple solution to this. Again, the issue is that when I zoom in the brick changes transparency to the current transparency I'm at. |
|
|
| Report Abuse |
|
|
|
| 24 Mar 2016 08:57 PM |
thats cause the bricks are inside the character
if u use filtering enabled i dont think this is a problem |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
| |
|
|
| 24 Mar 2016 08:59 PM |
| u just parented the bricks to workspace with FE? |
|
|
| Report Abuse |
|
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 24 Mar 2016 08:59 PM |
| Where are you parenting the bricks to? The character model? |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
| |
|