iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 22 Aug 2015 08:17 AM |
This is the error; prntscr.com/87l2o7 I used an inserted ModuleScript to run the function. This is the function's code;
function MainModule.Play() local pr = "rbxassetid://" local sp = script.Parent.MusicPlayer sp.Parent.Music:Stop() wait() sp.Parent.Music.SoundId = pr..sp.ID.Text local info = game:GetService("MarketplaceService"):GetProductInfo(sp.ID.Text) sp.MusicName.Text = info.Name sp.Parent.Music:Play() print("smartPlayer Compact | Now Playing: "..info.Name) end
^^ That code is called in a "Main" script. This is how the Main script calls:
script.Parent.MusicPlayer.play.MouseButton1Down:connect(function() -- Runs play function MainModule.Play() end)
Anyone get it? It's odd. The parent of the ModuleScript is in the same directory as the Main script.
If needed, this is the code that changes the parent of the module script;
function MainModule.Transform() script.Parent = game.Workspace.MusicPlayerInsert["smartTech Music Player"] end
It is called in the Main script, just after inserting it using require(id)
local x = Instance.new("Siggy") x.Parent = roblox.Forums x.Text = "oh hi there" |
|
|
| Report Abuse |
|
|
awotn
|
  |
| Joined: 01 Nov 2014 |
| Total Posts: 226 |
|
|
| 22 Aug 2015 08:18 AM |
| Play() is a method, so try naming the Play function something else. |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2015 08:39 AM |
Right here, you are casting a string to a function: local info = game:GetService("MarketplaceService"):GetProductInfo(sp.ID.Text)
BUT, that function does not allow a string as an argument. Try using tonumber: local info = game:GetService("MarketplaceService"):GetProductInfo(tonumber(sp.ID.Text)) |
|
|
| Report Abuse |
|
|
iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 22 Aug 2015 11:53 AM |
After applying the 2 methods you gave me it still doesn't work. Confused..
local x = Instance.new("Siggy") x.Parent = roblox.Forums x.Text = "oh hi there" |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2015 11:55 AM |
| You just posted a huge wall of unindented code and expect us to fix it? At least tell us what line the error is on. |
|
|
| Report Abuse |
|
|
iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 22 Aug 2015 11:55 AM |
Cough, view the screenshot cough
local x = Instance.new("Siggy") x.Parent = roblox.Forums x.Text = "oh hi there" |
|
|
| Report Abuse |
|
|
iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 22 Aug 2015 11:56 AM |
The error is somewhere in this code: function MainModule.Play() local pr = "rbxassetid://" local sp = script.Parent.MusicPlayer sp.Parent.Music:Stop() wait() sp.Parent.Music.SoundId = pr..sp.ID.Text local info = game:GetService("MarketplaceService"):GetProductInfo(sp.ID.Text) sp.MusicName.Text = info.Name sp.Parent.Music:Play() print("smartPlayer Compact | Now Playing: "..info.Name) end Though, I can't identify where.
local x = Instance.new("Siggy") x.Parent = roblox.Forums x.Text = "oh hi there" |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2015 11:57 AM |
| How about you put a comment by the line the error is on? |
|
|
| Report Abuse |
|
|
iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 22 Aug 2015 11:58 AM |
As this is a localscript, the error appears from the script calling it, which is the Main script. It only shows the line where the error is, and that of course is the line where the function is called.
local x = Instance.new("Siggy") x.Parent = roblox.Forums x.Text = "oh hi there" |
|
|
| Report Abuse |
|
|
iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 22 Aug 2015 11:58 AM |
I mean modulescript. Excuse me.
local x = Instance.new("Siggy") x.Parent = roblox.Forums x.Text = "oh hi there" |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2015 12:00 PM |
| That's not true, come back when you plan on actually telling us which line the error is on. |
|
|
| Report Abuse |
|
|
iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 22 Aug 2015 12:03 PM |
Proof.
click the play button connected to the broken function: prntscr.com/87nbqm look in the server log: prntscr.com/87nc3r
local x = Instance.new("Siggy") x.Parent = roblox.Forums x.Text = "oh hi there" |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2015 01:17 PM |
bruh
function MainModule.Play() local pr = "rbxassetid://" local sp = script.Parent.MusicPlayer sp.Parent.Music:Stop() wait() sp.Parent.Music.SoundId = pr..sp.ID.Text local info = game:GetService("MarketplaceService"):GetProductInfo(tonumber(sp.ID.Text)) sp.MusicName.Text = info.Name sp.Parent.Music:Play() print("smartPlayer Compact | Now Playing: "..info.Name) end |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 22 Aug 2015 01:19 PM |
Your siggy bugs me.
Instance.new("Siggy", roblox.Forums).Text = "oh hi there" |
|
|
| Report Abuse |
|
|