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: A question concerning localScripts.

Previous Thread :: Next Thread 
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
11 Aug 2014 03:44 AM
You can't access server objects from a local script?
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
11 Aug 2014 04:09 AM
Bump.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
11 Aug 2014 04:30 AM
Localscripts are client based, so no you cannot.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
11 Aug 2014 04:31 AM
Elaborate a bit I may be wrong.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
11 Aug 2014 04:45 AM
Thanks that's all I need.
That causes a problem for my car pack then =/.
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
11 Aug 2014 05:17 AM
You can access all instances except for those in ServerScriptService and ServerStorage using a LocalScript.

~The herp lerped a derp~
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
11 Aug 2014 08:04 AM
Then Why won't this script work then?
Because I was told I couldn't get access to the Workspace.




local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

Player.CharacterAdded:connect(function(character)
Player.Character.Humanoid.Seated:connect(function()

Mouse.KeyDown:connect(function(Key)
if Key:lower() == "l" then
for i,v in pairs (game.Workspace:GetChildren()) do
for e,z in pairs (v:GetChildren()) do
if v.Name == "Car" and v.VehicleSeat:FindFirstChild('SeatWeld')then
if v.VehicleSeat.SeatWeld.Part1.Parent == character then
if z.Name == "Light" and z.SpotLight.Enabled == false then
z.SpotLight.Enabled = true
elseif z.Name == "Light" and z.SpotLight.Enabled == true then
z.SpotLight.Enabled = false
end
end
end
end
end
end
end)
end)
end)
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
11 Aug 2014 08:06 AM
FilteringEnabled might be the problem.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
11 Aug 2014 08:10 AM
Where can I disable it?
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
11 Aug 2014 08:21 AM
Player.Character.Humanoid.Seated:connect(function() <- not sure if thats an event

and checking which car it is doesnt go okay I think.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
11 Aug 2014 08:22 AM
And its in Workspace. - a property.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
11 Aug 2014 02:50 PM
Seated is an event, I checked in the object browser and FilteringEnabled is already set to false.

Any other ideas?
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