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 » Scripters
Home Search
 

Re: How isn't this script working?

Previous Thread :: Next Thread 
EPICFACEHEAVEN is not online. EPICFACEHEAVEN
Joined: 24 Dec 2013
Total Posts: 1638
10 Aug 2015 04:45 AM
ts = game.workspace.ThemeSong
user = game.Players.LocalPlayer

ts:Play()

function onClicked()
if user.mouse1button.Play then
wait(0.1)
ts.Volume = 0
game.StarterGUI.ScreenGUI:destroy()

end
end



script.Parent.ClickDetector.MouseClick:connect(onClicked)

-- It's supposed to delete the ScreenGui and Stop the Song. (Not remove the song)
Report Abuse
seanb117 is not online. seanb117
Joined: 03 Feb 2010
Total Posts: 1020
10 Aug 2015 04:56 AM
ts:Stop()
Report Abuse
seanb117 is not online. seanb117
Joined: 03 Feb 2010
Total Posts: 1020
10 Aug 2015 04:58 AM
Not sure what this is though: "if user.mouse1button.Play then"
Report Abuse
EPICFACEHEAVEN is not online. EPICFACEHEAVEN
Joined: 24 Dec 2013
Total Posts: 1638
10 Aug 2015 05:00 AM
I am quite a newbie at scripting and I think it means 'If user clicks on Play then'

And if I do ts:Stop it completely just stops the song without the clicking the button.
Report Abuse
seanb117 is not online. seanb117
Joined: 03 Feb 2010
Total Posts: 1020
10 Aug 2015 05:07 AM
Is this located in a brick or a GUI?
Report Abuse
EPICFACEHEAVEN is not online. EPICFACEHEAVEN
Joined: 24 Dec 2013
Total Posts: 1638
10 Aug 2015 05:09 AM
It's located in Play (TextButton)
Report Abuse
seanb117 is not online. seanb117
Joined: 03 Feb 2010
Total Posts: 1020
10 Aug 2015 05:15 AM
ts = workspace.ThemeSong
user = game.Players.LocalPlayer

ts:Play()

script.Parent.MouseButton1Click:connect(function()
ts:Stop()
game.StarterGUI.ScreenGUI:destroy()
end)
Report Abuse
seanb117 is not online. seanb117
Joined: 03 Feb 2010
Total Posts: 1020
10 Aug 2015 05:16 AM
ClickDetectors are used in bricks. Gui Text Buttons have a different method of determining if it has been clicked.

Report Abuse
EPICFACEHEAVEN is not online. EPICFACEHEAVEN
Joined: 24 Dec 2013
Total Posts: 1638
10 Aug 2015 05:18 AM
Didn't work. This was My Output:

11:17:20.517 - MouseButton1Click is not a valid member of TextBox
11:17:20.519 - Script 'Players.Player.PlayerGui.ScreenGui.Play.Script', Line 6
Report Abuse
EPICFACEHEAVEN is not online. EPICFACEHEAVEN
Joined: 24 Dec 2013
Total Posts: 1638
10 Aug 2015 05:19 AM
Wtf? I didn't know that Play was a TextBox.
Report Abuse
seanb117 is not online. seanb117
Joined: 03 Feb 2010
Total Posts: 1020
10 Aug 2015 05:20 AM
Wellll that would be why. Haha. It needs to be a TextButton and it should work fine.
Report Abuse
EPICFACEHEAVEN is not online. EPICFACEHEAVEN
Joined: 24 Dec 2013
Total Posts: 1638
10 Aug 2015 05:26 AM
It worked but it didn't.

All it did was stop the music, but it didn't delete the ScreenGUI or Play.
Report Abuse
EPICFACEHEAVEN is not online. EPICFACEHEAVEN
Joined: 24 Dec 2013
Total Posts: 1638
10 Aug 2015 05:30 AM
Output:

11:25:54.758 - StarterGUI is not a valid member of DataModel
11:25:54.760 - Script 'Players.Player.PlayerGui.ScreenGui.Play.Script', Line 8
Report Abuse
EPICFACEHEAVEN is not online. EPICFACEHEAVEN
Joined: 24 Dec 2013
Total Posts: 1638
10 Aug 2015 05:37 AM
bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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