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: Still Not Working :(

Previous Thread :: Next Thread 
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
19 Feb 2012 07:10 AM
When I test my script in play solo nothing comes out in the output. So I guess it's just a random problem, please help. I don't know what's wrong with it.
~~~~~~~~~~~

BrickB = game.Workspace.BlueSpawn
BrickR = game.Workspace.RedSpawn
function BlingBlingBoiXD()
local user = script.Parent.Parent.Parent.Parent.Parent
script.Parent.Text = "Setting up teleportation."
print("{Test 1/2 Correct}")
wait(3)
script.Parent.Text = "Teleporting!"
if user.TeamColor == "Bright red" then
print("{Test is complete you win!}")
user.Character:MoveTo(Vector3.new(BrickR.Position.X,BrickR.Position.Y + 5,BrickR.Position.Z))
script.Parent.Parent.Parent:Destroy()
end
if user.TeamColor == "Bright blue" then
user.Character:MoveTo(Vector3.new(BrickB.Position.X,BrickB.Position.Y + 5,BrickB.Position.Z))
script.Parent.Parent.Parent:Destroy()
end
end

script.Parent.MouseButton1Down:connect(BlingBlingBoiXD)
Report Abuse
BrainScripter is not online. BrainScripter
Joined: 02 Aug 2011
Total Posts: 187
19 Feb 2012 07:19 AM
I see nothing wrong? Maybe it are the Parents.

    local BrickB = workspace.BlueSpawn
    local BrickR = workspace.RedSpawn
    
    script.Parent.MouseButton1Down:connect(function()
        local user = script.Parent.Parent.Parent.Parent.Parent
        script.Parent.Text = "Setting up teleportation."
        print("{Test 1/2 Correct}")
        wait(2)
        script.Parent.Text = "Teleporting!"
        if user.TeamColor == "Bright red" then
            print("{Test is complete you win!}")
            user.Character:MoveTo(Vector3.new(BrickR.Position.X, BrickR.Position.Y + 5, BrickR.Position.Z))
            script.Parent.Parent.Parent:Destroy()
        end
        if user.TeamColor == "Bright blue" then
            user.Character:MoveTo(Vector3.new(BrickB.Position.X, BrickB.Position.Y + 5, BrickB.Position.Z))
            script.Parent.Parent.Parent:Destroy()
        end
    end)
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
19 Feb 2012 07:21 AM
When it's not working but there's still no output, it generally means a connection isn't firing or a condition isn't being successfully fulfilled.

Also, just a side note: I'd change this
`end
if user.TeamColor == "Bright blue" then`

to this

`elseif user.TeamColor == "Bright blue" then`.

I believe it's more efficient, as well as takes up less space. (In a long script, single lines begin to matter :P)

"It looks nice, but I sense a disturbing lack of Rainbow Dash and Fluttershy."
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
19 Feb 2012 07:28 AM
Actaully it does have the printing done. You know the print'Test Complete' thing.
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
19 Feb 2012 07:28 AM
I think I'll try: if user.TeamColor == BrickColor.new("Bright red") then
I dunno.
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
19 Feb 2012 07:30 AM
does it work in play mode?
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
19 Feb 2012 07:32 AM
Yesh!!! It works! It's a miracle! Thank yall' lol. XD
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
19 Feb 2012 07:35 AM
lol I knew every thing would work (because I'm epic like that) and realized your error to be not adding a print in the second if statement. but I kept quiet to troll you... otrololo-lololo-lololo
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