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: Local Script in StarterGui Problems.

Previous Thread :: Next Thread 
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 11:06 PM
For some reason some local scripts don't work anymore if put into starterGui?
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
28 Aug 2013 11:07 PM
local scripts are locally ran. make sure the scripts are for play local player, not the server in general.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 11:09 PM
If I put a script into StarterGui and use localplayer it should work right?
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
28 Aug 2013 11:11 PM
whats the script?
Report Abuse
OcCartoonist is not online. OcCartoonist
Joined: 16 Apr 2013
Total Posts: 98
28 Aug 2013 11:13 PM
r weeeee best fwends drahsid?
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
28 Aug 2013 11:15 PM
Lol you just come in and say that xD lmao. Yeah. xD
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 11:17 PM
Heres one of them
local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local char = Player.Character
local controllers = {}

function removeControl()
for _, controller in pairs(game:GetService("ControllerService"):GetChildren()) do
controller.Parent = nil -- Take the controller out of ControllerService
table.insert(controllers, controller) -- Save it for later
end
end

function addControl()
for _, controller in pairs(controllers) do
controller.Parent = game:GetService("ControllerService") -- Put the controller back into ControllerService
end
controllers = {} -- Clear the table
end

function busy()
isbusy = script.Parent.Busy
if isbusy.Value == true then
removeControl()
elseif isbusy.Value == false then
addControl()
end
end

script.Parent.Busy.Changed:connect(busy)
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
28 Aug 2013 11:20 PM
looks fine too me, what does the output say?
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 11:33 PM
Works in studio not in game.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 11:38 PM
Theres no wrong output that's the problem.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
28 Aug 2013 11:38 PM
OH! I KNOW! start a local server, then player, then look at the output
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 11:40 PM
But how can I add myself into the game on a local scripter it doesn't show me. so the script won't even start.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
28 Aug 2013 11:41 PM
wut? .-.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
28 Aug 2013 11:42 PM
If I start a server where is my player the player that you play with can't get any simpler then that >.<
Report Abuse
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
28 Aug 2013 11:43 PM
-- Try this.

repeat wait() until game.Players.LocalPlayer

local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local char = Player.Character
local controllers = {}

function removeControl()
for _, controller in pairs(game:GetService("ControllerService"):GetChildren()) do
controller.Parent = nil -- Take the controller out of ControllerService
table.insert(controllers, controller) -- Save it for later
end
end

function addControl()
for _, controller in pairs(controllers) do
controller.Parent = game:GetService("ControllerService") -- Put the controller back into ControllerService
end
controllers = {} -- Clear the table
end

function busy()
isbusy = script.Parent.Busy
if isbusy.Value == true then
removeControl()
elseif isbusy.Value == false then
addControl()
end
end

script.Parent.Busy.Changed:connect(busy)

> Trolls are radical hipsters.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
28 Aug 2013 11:46 PM
after you start server you go to where you started the server and click start player.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
29 Aug 2013 12:16 AM
Lol it works on a server though.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
29 Aug 2013 12:20 AM
Nw I'm confused...
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
29 Aug 2013 12:21 AM
Now*

When life gives you lemons, Squirt 'em in your eyes. - Drahsid5
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
29 Aug 2013 12:31 AM
It works in studio test server not on a live game tho.
Report Abuse
mrpricetoyou is not online. mrpricetoyou
Joined: 25 Nov 2011
Total Posts: 5160
29 Aug 2013 12:36 AM
Servers don't run on different clients than solo, so why would starting a server start a difference?
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
29 Aug 2013 12:39 AM
I can prove it doesn't work on a real game but does in studio its very weird.
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