|
| 30 Sep 2012 08:32 PM |
| that does not work in online mode but works in solo... wth I thought that if this happened it only happened with non local scripts... how do i fix it...? (should i post the 59 line script?) |
|
|
| Report Abuse |
|
|
Xlaive
|
  |
| Joined: 25 Aug 2012 |
| Total Posts: 97 |
|
|
| 30 Sep 2012 08:34 PM |
| Try putting wait(5) at the top. |
|
|
| Report Abuse |
|
|
3DShooter
|
  |
| Joined: 04 Aug 2010 |
| Total Posts: 976 |
|
| |
|
|
| 30 Sep 2012 08:47 PM |
--the cc and lp variables are like that because i originally had this as a reg script and it didnt work, i think all the variables are correct as this works in solo but i have no idea if it really does...
print("lul") local CC=game.Workspace.CurrentCamera --repeat wait() until CC.Player.Value~="" wait(5) local LP=game.Players.LocalPlayer.Name
for i=1,3 do spot=CC.Nook1["Nook's Cranny"]["Spot"..(tostring(i))] if game.Players[LP][spot.Name].Value~="" and game.Players[LP].Time.Day.Value==game.Players[LP].PlayerGui.Clock.Digital.Day.Value then local a=game.Lighting.ShopItems.Square1Items[game.Players.LP.spot.Value]:Clone() a.Parent=workspace.CC.Nook1 if a.ClassName=="Model" then a:MoveTo(script.Parent.Position) elseif a.ClassName=="Tool" then local lol=Instance.new("Model") lol.Name=a.Name lol.Parent=CC.Nook1 local b=a:GetChildren() spot.Item.Value=a.Name for i=1,#b do if c:IsA("BasePart") then c.Parent=lol c.Anchored=true c.CanCollide=false else c:Destroy() end end lol:MoveTo(spot.Position) end else local a= game.Lighting.ShopItems.Square1Items:GetChildren() local num=math.random(1,#a) local thing=a[num]:Clone() spot.Item.Value=thing.Name if thing.ClassName=="Model" then thing.Parent=CC.Nook1 thing:MoveTo(spot.Position) elseif thing.ClassName=="Tool" then local lol=Instance.new("Model") lol.Name=thing.Name lol.Parent=CC.Nook1 local b=thing:GetChildren() for i=1,#b do local c=b[i]:Clone() if c:IsA("BasePart")==true then c.Parent=lol c.Anchored=true c.CanCollide=false else c:Destroy() end end lol:MoveTo(spot.Position) end game.Players[LP][spot.Name].Value=thing.Name end end
|
|
|
| Report Abuse |
|
|
crusada91
|
  |
| Joined: 04 Sep 2010 |
| Total Posts: 684 |
|
|
| 30 Sep 2012 08:53 PM |
| It has to be a localscript, no? |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2012 08:55 PM |
| yes because it is accessing things in the CurrentCamera. |
|
|
| Report Abuse |
|
|
3DShooter
|
  |
| Joined: 04 Aug 2010 |
| Total Posts: 976 |
|
|
| 30 Sep 2012 08:57 PM |
| Any output? A description of what it is supposed to do may help as well. |
|
|
| Report Abuse |
|
|
crusada91
|
  |
| Joined: 04 Sep 2010 |
| Total Posts: 684 |
|
|
| 30 Sep 2012 08:58 PM |
| Local scripts produce no outputs |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2012 09:00 PM |
| no ouput according to roblox's GUI ouput (in solo there is also no ouput but it works in solo), it is getting shop items out of lighting and putting them on Spot1, Spot2, and Spot3. before it gets the items it checks if you have been there that day (saves the day and what you last had in the shop when you entered) then it will have the same things as when you were there earlier, if you have not been there that day it will randomly choose items. |
|
|
| Report Abuse |
|
|
crusada91
|
  |
| Joined: 04 Sep 2010 |
| Total Posts: 684 |
|
|
| 30 Sep 2012 09:02 PM |
| So what is the line 59 or whatever? |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2012 09:03 PM |
| I was asking if i should post it because it was 59 lines long |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2012 09:03 PM |
| LocalScripts do produce output. |
|
|
| Report Abuse |
|
|
crusada91
|
  |
| Joined: 04 Sep 2010 |
| Total Posts: 684 |
|
|
| 30 Sep 2012 09:06 PM |
| Ohhk, so add a instead of print, instance.new message to check where things mess up?> |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2012 09:08 PM |
| how would I have the message text show output of the script? |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2012 09:11 PM |
Test > Start Server wait 'til server starts (This is in Studio) Test > Start Player (Make sure output is open, and test it from there.) |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2012 09:12 PM |
| ^I believe that is the same as doing play solo in terms of local script/non local script glitches but I will see if it gives ouput.... |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Sep 2012 09:22 PM |
in StartServer>Start Player it works just like in play solo but it does not work in multiplayer
|
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Sep 2012 09:52 PM |
| *facepalm* nevermind I just was accidentally testing in studio instead of multiplayer |
|
|
| Report Abuse |
|
|
| |
|
| |
|