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: Doesn't work in online, only solo.

Previous Thread :: Next Thread 
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
06 Apr 2013 05:00 PM
repeat wait() until game.Players.LocalPlayer.Character
if not game.Players.LocalPlayer:findFirstChild("Spawned") then
Instance.new("IntValue", game.Players.LocalPlayer).Name = "Spawned"
--game.Players.LocalPlayer.Character.Parent = game.Lighting
game.Players.LocalPlayer.Character.Torso.Anchored = true


script.Parent.Parent.Parent.Loading.LoadingText.Visible = true
wait(5)
script.Parent.Parent.Parent.Loading.LoadingText.Visible = false
script.Parent.Parent.Parent.Loading.ZepticLogo.Visible = true
wait(5)
script.Parent.Parent.Parent.Loading.ZepticLogo.Visible = false

wait(2)

for i = 1, 0, -.1 do
wait(0.02)
script.Parent.Parent.Parent.Loading.FPSIntro.TextTransparency = (i)
script.Parent.Parent.Parent.Loading.FPSEngine.TextTransparency = (i)
end

wait(5)

for f = 0, 1, .1 do
wait(0.02)
script.Parent.Parent.Parent.Loading.FPSEngine.TextTransparency = (f)
script.Parent.Parent.Parent.Loading.FPSIntro.TextTransparency = (f)
end

wait(1)
script.Parent.Parent.Parent.Loading.Visible = false
script.Parent.Parent.Parent.Start.Visible = true
end

script.Parent.MouseButton1Down:connect(function()
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.Parent.HUD.Ammo.Visible = true
script.Parent.Parent.Parent.Parent.HUD.Map.Visible = true
script.Parent.Parent.Parent.Parent.HUD.Connected.Visible = true
game.Players.LocalPlayer.Character.Torso.Anchored = false
if game.Players.LocalPlayer.TeamColor == BrickColor.new("Really red") then
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(Vector3.new(-236, 3.7, -3.5))
else
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(Vector3.new(144.911, 3.7, 243.64))
end
end)
--[[gui = game.Players.LocalPlayer.PlayerGui.Starter
gui.Parent = game.Players.LocalPlayer
game.Players.LocalPlayer:LoadCharacter()
wait(1)
game.Players.LocalPlayer.Character:MoveTo(Vector3.new(1365, 8, -168.5))
game.Players.LocalPlayer.Character:MakeJoints()
gui.Loading.Visible = false
gui.Start.Visible = false
gui.Parent = game.Players.LocalPlayer.PlayerGui
end) ]]

Disregard females, acquire currency.
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
06 Apr 2013 05:01 PM
Try putting it in a LocalScript, in Play Solo all scripts are LocalScripts.

Remove the floodcheck!
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
06 Apr 2013 05:02 PM
this is in a localscript.

Disregard females, acquire currency.
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
06 Apr 2013 05:12 PM
No other suggestions, sorry.

Remove the floodcheck!
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
06 Apr 2013 06:10 PM
Bump.

Disregard females, acquire currency.
Report Abuse
MattJon is not online. MattJon
Joined: 28 Apr 2009
Total Posts: 660
06 Apr 2013 06:53 PM
Just bumping so that dumb thread with the long title goes down.
Report Abuse
3rdblox is not online. 3rdblox
Joined: 09 Dec 2012
Total Posts: 4741
06 Apr 2013 07:16 PM
Wow... BIG script... Try posting a new version of this, but only with the bit of code you think was wrong. Many helpers will get overwhelmed by such a large script, and leave to help other people.
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
07 Apr 2013 02:19 PM
That's the thing, I dunno which part is wrong. It works in solo, so no output is given.

Disregard females, acquire currency.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Apr 2013 02:22 PM
@3rdblox

That really isn't a long script. My animation script is LONGER than that and it's a reload animation that shows you putting a rocket in the rocket launcher to launch.
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
07 Apr 2013 02:25 PM
Now that that's stated, can someone tell me why it's broken? xD

Disregard females, acquire currency.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Apr 2013 02:32 PM
First Line:

repeat wait() until game.Players.LocalPlayer:FindFirstChild("Character")


Yes, :FindFirstChild() works on properties.
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
07 Apr 2013 02:34 PM
Is there a difference? ._.

Disregard females, acquire currency.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Apr 2013 02:36 PM
There is quite a difference.

I don't know how to explain it, though. It just works better when you use :FindFirstChild().
Report Abuse
coolikevin22 is not online. coolikevin22
Joined: 21 Feb 2011
Total Posts: 450
07 Apr 2013 02:36 PM
Lol I was lazy to read xD
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Apr 2013 02:37 PM
Then get out. You don't help people if you're lazy, you just spam.
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
07 Apr 2013 02:42 PM
now I don't die, but it doesn't show the intro.

Disregard females, acquire currency.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Apr 2013 02:42 PM
Try using Variables to index the 'loading' Instance?
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
07 Apr 2013 02:43 PM
Nevermind, I still die. T_T

Disregard females, acquire currency.
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
07 Apr 2013 02:43 PM
@dig

I don't think using variables or not using them would make the script work or not.

Disregard females, acquire currency.
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
07 Apr 2013 02:44 PM
@Coolkevin, Why are you always too lazy to read? Fake much?
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Apr 2013 02:45 PM
@GreenDay, they worked for me. I was getting errors related to Parent being nil, but when I bought in variables, they worked perfectly fine.
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
07 Apr 2013 03:00 PM
ltext = script.Parent.Parent.Parent.Loading.LoadingText

zeptic = script.Parent.Parent.Parent.Loading.ZepticLogo

FPSI = script.Parent.Parent.Parent.Loading.FPSIntro

FPSE = script.Parent.Parent.Parent.Loading.FPSEngine

loadframe = script.Parent.Parent.Parent.Loading
startframe = script.Parent.Parent.Parent.Start

HUD = script.Parent.Parent.Parent.Parent.HUDGui



repeat wait() until game.Players.LocalPlayer:findFirstChild("Character")
if not game.Players.LocalPlayer:findFirstChild("Spawned") then
Instance.new("IntValue", game.Players.LocalPlayer).Name = "Spawned"
--game.Players.LocalPlayer.Character.Parent = game.Lighting
game.Players.LocalPlayer.Character.Torso.Anchored = true


ltext.Visible = true
wait(5)
ltext.Visible = false
zeptic.Visible = true
wait(5)
zeptic.Visible = false

wait(2)

for i = 1, 0, -.1 do
wait(0.02)
FPSI.TextTransparency = (i)
FPSE.TextTransparency = (i)
end

wait(5)

for f = 0, 1, .1 do
wait(0.02)
FPSE.TextTransparency = (f)
FPSI.TextTransparency = (f)
end

wait(1)
loadingframe.Visible = false
startframe.Visible = true
end

script.Parent.MouseButton1Down:connect(function()
script.Parent.Parent.Visible = false
HUD.Ammo.Visible = true
HUD.Map.Visible = true
HUD.Connected.Visible = true
game.Players.LocalPlayer.Character.Torso.Anchored = false
if game.Players.LocalPlayer.TeamColor == BrickColor.new("Really red") then
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(Vector3.new(-236, 3.7, -3.5))
else
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(Vector3.new(144.911, 3.7, 243.64))
end
end)
--[[gui = game.Players.LocalPlayer.PlayerGui.Starter
gui.Parent = game.Players.LocalPlayer
game.Players.LocalPlayer:LoadCharacter()
wait(1)
game.Players.LocalPlayer.Character:MoveTo(Vector3.new(1365, 8, -168.5))
game.Players.LocalPlayer.Character:MakeJoints()
gui.Loading.Visible = false
gui.Start.Visible = false
gui.Parent = game.Players.LocalPlayer.PlayerGui
end) ]]

The output says that HUDGui is not a valid member of PlayerGui. Do I have to put game.StarterGui.HUDGui then?

Disregard females, acquire currency.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Apr 2013 03:02 PM
If you use the HUDGui from StarterGui, you will be referencing an object that nobody has.
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
07 Apr 2013 03:03 PM
Then how do I fix this? The HUD isn't visible when the other GUIs are up, because it would be on top of them, and I have way too many GUIs to make them all a higher ZIndex.

Disregard females, acquire currency.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Apr 2013 03:04 PM
:FindFirstChild() is your friend again.
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