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
 

Simple Output Help

Previous Thread :: Next Thread 
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
17 Aug 2011 06:08 PM
I have posted this topic once before, got a few answers that did not suit my needs.


Details:


I am creating a scriptbuilder, my c/ command works fine, it creates a script ETC. My local/ is the one giving the troubles. The command is working perfectly, it creates the script, stores the values, put it in the speakers character, and enables the script. Seeing as I get no output because it is a localscript. So people suggested to make an output, but seeing as I have not the first clue on how to make one, I cannot do such a thing. So I am asking of you guys, to reply with a list of functions/methods/properties/etc. I should study to figure out how to create an output that accepts wait's ETC.



NOT A REQUEST; All I am asking for is a little boost into making an output.
Report Abuse
Greendolph is not online. Greendolph
Joined: 07 May 2008
Total Posts: 2543
17 Aug 2011 06:10 PM
It is simply a case of defining a new function for print() that sends to a GUI textlabel.
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
17 Aug 2011 06:14 PM
What if I use xpcall?
Report Abuse
Greendolph is not online. Greendolph
Joined: 07 May 2008
Total Posts: 2543
17 Aug 2011 06:15 PM
I suppose that would work too..
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
17 Aug 2011 06:21 PM
Wrong, any pcall can't handle a wait(). I need to figure out a way.


Also, I have tested putting this script into my SB and it also did not work. There is absolutely nothing wrong with it, I use it all the time.



local/
local click = false
local name = "Riderj"
local Player = game.Players[name]
local brickcolor = 1003
script.Parent = Player.Character

pcall(function() Player.Character.Writing:Remove() end)
local Writing = Instance.new("Model")
Writing.Parent = Player.Character
Writing.Name = "Writing"

if script.Parent.Name == Player.Name then
pcall(function() Player.Backpack.Script:Remove() end)
hopper = Instance.new("HopperBin")
hopper.Name = "Grabby"
hopper.Parent = Player.Backpack
script.Parent = hopper
end
function onB1U(Mouse)
clicked = false
end
function onB1D(Mouse)

clicked = true
local draw = false
Mouse.Move:connect(function()
if clicked == true then
i = Instance.new("Part",Writing)
i.Size = Vector3.new(0,0,0)
i.CFrame = CFrame.new(Mouse.Hit.X,1,Mouse.Hit.Z)
i.Anchored = true
i.CanCollide = true
i.BrickColor = BrickColor.new(brickcolor)
i.TopSurface = 0
end
end)
end

function onKeyDown(key)
key:lower()
if key == "r" then
for i,v in pairs(Writing:GetChildren()) do
v:Remove()
end
end
if key == "t" then
brickcolor = math.random(20,50)
end
if key == "y" then
brickcolor = 1003
end
end

function onSelected(Mouse)
Mouse.KeyDown:connect(onKeyDown)
Mouse.Button1Down:connect(function() onB1D(Mouse) end)
Mouse.Button1Up:connect(function() onB1U(Mouse) end)
local bin = script.Parent
script.Parent = script.Parent.Parent
bin:Remove()
end
hopper.Selected:connect(onSelected)






Something is up with my local script.



Localscript setup:


game.workspace
|SBS
||SBScript
|||LocalScript
||||Values


I am cloning it like this:


local ls = script.LocalScript:Clone()


Then parenting it.

ls.Parent = game.Players[Player].Character

Then I am enabling the script.

ls.Enable.


Inside the localscript I have:

loadstring(script.ScriptCode.Value)()





Yet the localscripts don't work correctly.
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
17 Aug 2011 06:24 PM
Parent the local script to either:

speaker.Character
speaker.Backpack
speaker.PlayerGui
Workspace.CurrentCamera

Either of those will work. Otherwise, local scripts won't run.
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
17 Aug 2011 08:26 PM
Did I not mention I did that? I'll go check. I parented it to my character.
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