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: Please Im begging you Im getting REALLY fustrated T-T

Previous Thread :: Next Thread 
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 12:52 AM
Can somone please help me fix this simple script?

Problem: The script works perfect on play solo but doesnt work on Play. What I mean by doesnt work means is that the GUI resets and pauses when you die

http://www.roblox.com/BLAH-item?id=83810750
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 12:56 AM
BUMP T-T
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 12:56 AM
Bump
Report Abuse
aaronzepeda33 is not online. aaronzepeda33
Joined: 26 Aug 2009
Total Posts: 964
17 Jun 2012 12:58 AM
BLAH is what I said when I saw this script being a free model.
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 01:03 AM
Script in Workspace:
local OpenFor = 60 * 5--Five Minutes
local ClosedFor = 60 * 3--Three Minutes
local Door = game.Workspace.Door--Where the door is(the example is a brick named "Door" in workspace)

--[[Instructions]-------
You have no need to
change anything in this
script, I programmed them
to what you had requested.
However, if you havent
already, place the one GUI
inside of this script
into StarterGUI.

Changes to adjust time:

OpenFor:The time the
door is open, change
this(in seconds) to
the amount of time
it will stay open.

ClosedFor:The time
the door is closed,
change this(in
seconds) to the
amount of time
it will stay closed.

Door:The location
of the door by which
it will be accessed.
--]]--------------------

function FadeIn(Frames, Time)
for i = 1, Frames do
Door.Transparency = 1 - ((0.6 / Frames) * i)
wait(Time)
end end

function FadeOut(Frames, Time)
for i = 1, Frames do
Door.Transparency = ((1 / Frames) * i)
wait(Time)
end end

function CountedWait(Amount, Bool)
script.IsOpen.Value = Bool
for i = 1, Amount * 100 do
wait(0.01)
script.IsOpen.Time.Value = Amount - (i / 100)
end end

while true do
FadeOut(20, 0.1)
Door.CanCollide = false
CountedWait(OpenFor, true)
FadeIn(20, 0.1)
Door.CanCollide = true
CountedWait(ClosedFor, false)
end

Script in GUI:
[THIS IS A LOCALSCRIPT]

local OpenValue = game.Workspace.DoorTimer.IsOpen
local TimeValue = OpenValue.Time

local TextLabel = script.Parent.TextLabel
local TimeLabel = script.Parent.Time

local OpenText = "The sheild will remain off for:"
local CloseText = "The sheild will remain on for:"

function StatusChange(Bool)
if Bool then
TextLabel.Text = OpenText
else
TextLabel.Text = CloseText
end end

function TimeChange(Value)
TimeLabel.Text = Value
end

OpenValue.Changed:connect(StatusChange)
TimeValue.Changed:connect(TimeChange)

StatusChange(OpenValue.Value)
TimeChange(TimeValue.Value)
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 01:28 AM
BumP
Report Abuse
PrinceCamelot is not online. PrinceCamelot
Joined: 08 Jul 2011
Total Posts: 489
17 Jun 2012 01:31 AM
We don't fix free models.
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
17 Jun 2012 01:34 AM
Have you tried using the OutPut? SCRIPTER'S BEST FRIEND.
(Wiki is the BESTEST friend!! (I know bestest is not a word.. e.e))
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 01:41 AM
Its not free models. And theres no output.
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
17 Jun 2012 01:45 AM
In ROBLOX Studio, open a place by using Ctrl + N. Insert your script.
Click View -> Output
Now, click the play button.
If script has an error, it'll point it/them out and the line(s).
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 01:52 AM
No theres literally no output.
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 02:02 AM
Bump
Report Abuse
Solotaire is not online. Solotaire
Joined: 30 Jul 2009
Total Posts: 30356
17 Jun 2012 02:31 AM
Scripts that work in Solo mode but not Play mode are generally characterized not by an error in code, but by a lack of connections being made. Try adding "wait(1)" to the scripts on line one.
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
17 Jun 2012 02:44 AM
I just tried this myself, TWO ERRORS! Also, this is TWO diff. scripts.. e.e
FIRST SCRIPT GOES IN WORKSPACE:
--Script in Workspace:
local OpenFor = 60 * 5--Five Minutes
local ClosedFor = 60 * 3--Three Minutes
local Door = game.Workspace.Door--Where the door is(the example is a brick named "Door" in workspace)

--[[Instructions]-------
You have no need to
change anything in this
script, I programmed them
to what you had requested.
However, if you havent
already, place the one GUI
inside of this script
into StarterGUI.

Changes to adjust time:

OpenFor:The time the
door is open, change
this(in seconds) to
the amount of time
it will stay open.

ClosedFor:The time
the door is closed,
change this(in
seconds) to the
amount of time
it will stay closed.

Door:The location
of the door by which
it will be accessed.
--]]--------------------

function FadeIn(Frames, Time)
for i = 1, Frames do
Door.Transparency = 1 - ((0.6 / Frames) * i)
wait(Time)
end end

function FadeOut(Frames, Time)
for i = 1, Frames do
Door.Transparency = ((1 / Frames) * i)
wait(Time)
end end

function CountedWait(Amount, Bool)
script.IsOpen.Value = Bool
for i = 1, Amount * 100 do
wait(0.01)
script.IsOpen.Time.Value = Amount - (i / 100)
end end

while true do
FadeOut(20, 0.1)
Door.CanCollide = false
CountedWait(OpenFor, true)
FadeIn(20, 0.1)
Door.CanCollide = true
CountedWait(ClosedFor, false)
end






SECOND SCRIPT GOES INTO SOME GUI:
--Script in GUI:
--[THIS IS A LOCALSCRIPT]

local OpenValue = game.Workspace.DoorTimer.IsOpen
local TimeValue = OpenValue.Time

local TextLabel = script.Parent.TextLabel
local TimeLabel = script.Parent.Time

local OpenText = "The sheild will remain off for:"
local CloseText = "The sheild will remain on for:"

function StatusChange(Bool)
if Bool then
TextLabel.Text = OpenText
else
TextLabel.Text = CloseText
end end

function TimeChange(Value)
TimeLabel.Text = Value
end

OpenValue.Changed:connect(StatusChange)
TimeValue.Changed:connect(TimeChange)

StatusChange(OpenValue.Value)
TimeChange(TimeValue.Value)








I fixed all/most errors. You're welcome, if it still won't work, tell me.
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
17 Jun 2012 02:45 AM
*FIX* Gui goes into Second script. My mistake.
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
17 Jun 2012 02:46 AM
Then place script, with GUI in that, into StarterGUI, and Place the first script into workspace.
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 03:40 AM
I already knew it was 2 different script -.-
And how is it supposd to work if you gae me the same script?
Also I know where the script goes in...
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 03:49 AM
Bump
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 03:53 AM
No output too.
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 03:58 AM
@Solotaire Doesnt work...
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 03:59 AM
This is soooooo frustarting that I might smash my face into the keyboard with my glasses on too... T-T
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 04:05 AM
Bump
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
17 Jun 2012 04:07 AM
Bump Noob above
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
17 Jun 2012 04:11 AM
OMG DID YOU NOT SEE WHERE I ADDED IN THE -- FOR THE "IN THE WORKSPACE:" PART? AND THE "IN THE GUI:" PART, ALSO
THE "[LOCALSCRIPT]" PART. THAT'S WHAT WAS SCREWY.
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
17 Jun 2012 04:11 AM
IT THOUGHT IT WAS PART OF THE SCRIPT. SO I ADDED -- TO MAKE IT NOTES.
>:O
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