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: Doesn't print anything...? (Online or in studio)

Previous Thread :: Next Thread 
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:16 PM
If it threw an error I would post it but it's unfortunate and doesn't throw an error.

You may be thinking that the pcall() is useless where I put it but I only do that so it doesn't break the script if it errors.

My only conclusion is that .Played is not working at all..

Lazerus.Played:connect(function()
print("Fired")
SongStarted:FireAllClients(Lazerus.SoundId)
end)

SongStarted.OnClientEvent:connect(function(Sound)
print("Fired")
local ID = Sound:match("%d+")
NumbValue.Value = ID
local Song = MarketplaceService:GetProductInfo(ID)
pcall(function()
CurrentSong.Text = "[Now Playing]: "..Song.Name
while wait() do
if Lazerus.IsPlaying then
SongProgress:TweenSize(UDim2.new((math.floor(Lazerus.TimePosition/Lazerus.TimeLength)),0,1,0), "Out", "Quint", 1, true)
end
end
end)
end)


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
25 Sep 2016 04:19 PM
You cant FireAllClients from a local script

if that is in a server script, it might work. but the Played event should work anyways on local scripts
Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:25 PM
This part is Server:

Lazerus.Played:connect(function()
print("Fired")
SongStarted:FireAllClients(Lazerus.SoundId)
end)

The rest that I posted was client side.


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
25 Sep 2016 04:26 PM
well cant you just do this?:
Lazerus.Played:connect(function(Sound)
Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:27 PM
Uh, yes but it's not really needed.


Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
25 Sep 2016 04:28 PM

u been on the SAME SCRIPT FOR MONTHS NOW


Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:29 PM
llaser

This is a new script, I took it and redid it since I don't like the other one.


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
25 Sep 2016 04:30 PM
"Its not really needed"

????????? what is wrong with removing the server script entirely and connecting on the client? that script isnt needed XD
Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:32 PM
Yeah, I could do that but I like keeping server and client seperate especially when it comes to sounds and FE. (Notice how this script is FE)


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
25 Sep 2016 04:32 PM
it will still work on the client, the server replicates to the client so the event will be available on the client and that was useless
Report Abuse
Mys_t is not online. Mys_t
Joined: 23 Aug 2016
Total Posts: 521
25 Sep 2016 04:36 PM
sup @i
Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:36 PM
Uh. Ok, well none of what you just said helped me resolve the issue so...


Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:36 PM
@myst

Idk you


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
25 Sep 2016 04:38 PM
connecting it to Played will work even with FE enabled so you dont need that :/
unless the event says on the wiki "YOU CAN ONLY USE THIS IN ___ FOR IT TO WORK" it will work with FE enabled
Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
25 Sep 2016 04:41 PM
"This is a new script, I took it and redid it since I don't like the other one."

U BEEN DOING THE SAME THING FOR MONTHS


Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:41 PM
Needed or not, I don't care. It works in the other version I scripted.

For my other game:
The server script is the same exact one as the one I just scripted and it works just fine.

The only thing that is different is the client side.


Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
25 Sep 2016 04:41 PM
WEEKS*


Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:42 PM
@llaser

Dude, I don't care. I'm not even a popular dev at all nor am I known so why does it matter so much to you?


Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
25 Sep 2016 04:46 PM
BECAUSE U CANT BE THIS BAD FOR A MUSIC PLAYER


Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:48 PM
Actually, this doesn't play the music. All this does is checks if music is playing or not.


Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
25 Sep 2016 04:50 PM
I SAID FOR A MUSIC PLAYER

FOR A


Report Abuse
i_Movie is not online. i_Movie
Joined: 06 Apr 2014
Total Posts: 11725
25 Sep 2016 04:53 PM
And... ur calling me bad although I literally scripted an entire other version that works just fine... Whelp.. ded..


Report Abuse
llaserx is not online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
25 Sep 2016 05:00 PM
THEN U SHOULDNT BE STRUGGLING

LIAR


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