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
 

Local Parts [new]

Previous Thread :: Next Thread 
Optimxl is not online. 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 is not online. 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 is not online. Optimxl
Joined: 26 Feb 2011
Total Posts: 9430
17 Dec 2015 02:53 PM
b2
Report Abuse
membra is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
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