Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 17 Dec 2015 02:48 PM |
Okay so this script works perfectly in Studio, but not in game for some reason. There's no errors in Studio or In Game. Help?
local Game = game local Players = Game:GetService("Players") local Workspace = Game:GetService("Workspace") local Storage = Game:GetService("ServerStorage")
local User = Players.LocalPlayer local Team = User.TeamColor pcall(function() Workspace.CameraBin:Destroy() end) local Camera = Instance.new("Camera", Workspace) Camera.Name = "CameraBin"
local BDoor1 = Storage:WaitForChild("BlueDoor1"):Clone() local BDoor2 = Storage:WaitForChild("BlueDoor2"):Clone()
local GDoor1 = Storage:WaitForChild("GreenDoor1"):Clone() local GDoor2 = Storage:WaitForChild("GreenDoor2"):Clone()
BDoor1.Parent = Camera; BDoor2.Parent = Camera; GDoor1.Parent = Camera; GDoor2.Parent = Camera;
if Team == BrickColor.new("Bright blue") then BDoor1.CanCollide = false; BDoor2.CanCollide = false end
if Team == BrickColor.new("Lime green") then GDoor1.CanCollide = false; GDoor2.CanCollide = false end
|
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 17 Dec 2015 02:50 PM |
| Also I don't have time to work with FE, trying to make this one work. Bump |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|
membra
|
  |
| Joined: 14 Oct 2008 |
| Total Posts: 6313 |
|
|
| 17 Dec 2015 02:53 PM |
| You should use FE, but otherwise... Trying to access server storage from local script? |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 17 Dec 2015 02:56 PM |
| @membra Im trying to make local parts for a basically team only door for my lasertag game. The doors are kept in ServerStorage, and in Studio they work perfectly, but in game they dont come out of serverstorage (Im guessing, theres no errors) |
|
|
| Report Abuse |
|
|
membra
|
  |
| Joined: 14 Oct 2008 |
| Total Posts: 6313 |
|
|
| 17 Dec 2015 02:58 PM |
| The client can't access content in the ServerStorage. Studio doesn't take this into account, so it'll only work in that environment. |
|
|
| Report Abuse |
|
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 17 Dec 2015 02:58 PM |
i dont like spamming both of the threads
but i missed the storage thing in the original one if you need some future reference this is a copy from an earlier post of mine
keep your localscripts inside player server scripts inside sss, stuff you don't want client to access in serverstorage everything that needs to be replicated to both, client and server in replicatedstorage (including remoteevents) stuff that only needs to be replicated to client in replicatedfirst
ill just go sleep now ive never acted this weird i must of have taken something |
|
|
| Report Abuse |
|
|
membra
|
  |
| Joined: 14 Oct 2008 |
| Total Posts: 6313 |
|
|
| 17 Dec 2015 02:58 PM |
| I guess that I phrased my first post a bit oddly, sorry about that. |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 17 Dec 2015 02:59 PM |
| Alright so how would I go about making this work? I'm advertizing my game at the moment and there are lots of spawnkillers, so I'm trying to do this ASAP. I just need Local Parts per team without FE. |
|
|
| Report Abuse |
|
|
membra
|
  |
| Joined: 14 Oct 2008 |
| Total Posts: 6313 |
|
|
| 17 Dec 2015 03:02 PM |
@OzzyFin Don't worry about missing it, it's awesome to know that there are so many people willing to help OP out, even if it's difficult to find the resolution to such an issue. The fact that you posted additional resources to assist OP in the future is also a big help, and probably worth more than spoon-feeding a solution.
@OP To fix this issue, move the content to a place where it can be read by the client, such as ReplicatedStorage. |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 17 Dec 2015 03:05 PM |
| Yeah this is honestly, a hard topic and I really appreciate the help. I'm testing it now, I'll tell you if it works or not. |
|
|
| Report Abuse |
|
|
Lacryma
|
  |
| Joined: 15 Feb 2010 |
| Total Posts: 22696 |
|
|
| 17 Dec 2015 03:09 PM |
Last time I developed on ROBLOX, local parts can be established using the local camera. Local script with FE on can also allow local parts to be created. |
|
|
| Report Abuse |
|
|
Lacryma
|
  |
| Joined: 15 Feb 2010 |
| Total Posts: 22696 |
|
|
| 17 Dec 2015 03:10 PM |
| My mistake, I feel like I completely dodged the question. |
|
|
| Report Abuse |
|
|