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
 

Got a problem with your script? I'll try to fix it.

Previous Thread :: Next Thread 
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
09 Aug 2011 05:43 PM
Some simple terms.

If it's a long or confusing script, explain it. I don't want to have to decypher every post.

If the problematic script references other scripts or is referenced by other scripts,you may need to post those too. Object heirachy would be nice, too.

If it's an error, post the ouput. Also post when the error occurs (e.g. When a button is pressed);

If it's a bug, explain what it's supposed to do, then what it does instead.


I'm posting from my phone right now so it will take time and effort to reply but hopefully I can be quicker tomorrow.
Report Abuse
SkullCandi is not online. SkullCandi
Joined: 30 Jan 2010
Total Posts: 4
09 Aug 2011 05:47 PM
I'm trying to have it where the the bricks blink at two different times. However, when i join the game, the bricks change color all at once! Heres my script:


script.Parent.BrickColor = BrickColor.new("Bright red")
wait(2)
while true do
script.Parent.BrickColor = BrickColor.new("Black")
wait(1)
script.Parent.BrickColor = BrickColor.new("Bright red")
wait(1)
end


Is there anything wrong?
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
09 Aug 2011 05:51 PM
@Skull:

If they all have the same script then yes, they WOULD all blink at the same time. If you want them to blink at different times change the wait() at the beginning to different times, depending on how soon you want it to start.
Report Abuse
SkullCandi is not online. SkullCandi
Joined: 30 Jan 2010
Total Posts: 4
09 Aug 2011 05:54 PM
Wait, duh! Thanks so much. haha. I wasn't thinking clearly.
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
09 Aug 2011 05:54 PM
Here's the script noone has managed to fix for 2 weeks now...

NOTE: It works in solo mode, but it won't work online (server)
Tip: Its a Hopperbin and I tried to use it in LocalScript and Normal Script.

bin = script.Parent
me = script.Parent.Parent.Parent.Character

function invisible()
for _,v in pairs(me:GetChildren()) do
if v:IsA("Part") then
v.Transparency = 1
end
if v:IsA("Hat") then
v:Remove()
end
end
end

function onButton1Down(mouse)
if mouse.Target.Name == "SmallBox" then
invisible()
local prt = Instance.new("Part")
prt.CanCollide = true
prt.BrickColor = BrickColor.new("Brown")
prt.Locked = true
prt.Name = "SmallBox"
prt.Material = "Wood"
prt.formFactor = "Symmetric"
prt.TopSurface = "Smooth"
prt.BottomSurface = "Smooth"
prt.Size = Vector3.new(3,3,3)
prt.Parent = me
local w = Instance.new("Weld")
w.Parent = prt
w.Part0 = prt
w.Part1 = me["Torso"]
w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -0.4, 0)
script.Parent:Remove()

elseif mouse.Target.Name == "BigBox" then
invisible()
local prt = Instance.new("Part")
prt.CanCollide = true
prt.BrickColor = BrickColor.new("Brown")
prt.Locked = true
prt.Name = "BigBox"
prt.Size = Vector3.new(4,4,4)
prt.Parent = me
prt.Material = "Wood"
prt.formFactor = "Symmetric"
prt.TopSurface = "Smooth"
prt.BottomSurface = "Smooth"
local w = Instance.new("Weld")
w.Parent = prt
w.Part0 = prt
w.Part1 = me["Torso"]
w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -0.95, 0)
script.Parent:Remove()
else
print("Wrong Item Clicked.")
end
end

function onSelected(mouse)
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

bin.Selected:connect(onSelected)
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
09 Aug 2011 06:01 PM
@Crni:

LocalScripts are a killer, partially because they don't error to the output when they break. However, it's possible that the error lies in the fact that, at the very start of the script, you try and access the character, possibly before it's loaded. You could fix this script by putting

while bin.Parent.Parent == nil do wait() end

in between lines 1 and 2. This would make sure the script runs only when the character is loaded.
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
09 Aug 2011 06:09 PM
Well, it didn't fix it.

It actually prints when the wrong item is clicked, but when i press an item that is in the "list" then it just break online, and offline there is just one yellow error in output saying Weld cannot be a child of Player.BigBox
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
09 Aug 2011 06:10 PM
"LocalScripts are a killer, partially because they don't error to the output when they break."

Lie, if you keep your output open and go to play solo they run and give the error.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
09 Aug 2011 06:18 PM
@Crni:

Ah. In that case, pump the script full of print()s and see how far it gets without stopping in server test.

@RATEX:

I was talking about with a server.

Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
09 Aug 2011 06:26 PM
Well, I went Tools > Start Server
Tools > Start Player

And used the tool and it worked perfectly, but it won't work in real public Server, I can't see a reason why, Oh and it won't print anything, but it works xD
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
09 Aug 2011 06:28 PM
@Crni for some reason LocalScripts rarely print anything in the output of PseudoPlayers and I think it does that because it's local and not client.
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
09 Aug 2011 06:30 PM
._. I fixed it...
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
09 Aug 2011 06:31 PM
Working in server test but not in play mode? Well, that is odd. Does it solid fail to work in play, or does it sometimes work if you reselect / respawn? Same question in vice versa for server test.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
09 Aug 2011 06:32 PM
Late post. Blame the phone. How'd you fix it?
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
09 Aug 2011 06:33 PM
(hi RATE its me from scripters forum)


what is wrong with this? i want it so that when the GUI is clicked the gui goes down out of the screen. whats wrong with it?



--The ScreenGui is called StartGui and the Button in the StartGui is called StartingButton BTW
StartingButton = game.Workspace.TextButton
function onClicked()
StartingButton.Position = UDim2.new(0, 200, 0, 305)
wait(0.1)
StartingButton.Position = UDim2.new(0, 200, 0, 310)
wait(0.1)
StartingButton.Position = UDim2.new(0, 200, 0, 315)
wait(0.1)
StartingButton.Position = UDim2.new(0, 200, 0, 320)
wait(0.1)
StartingButton.Position = UDim2.new(0, 200, 0, 325)
end
StartingButton.MouseButton1Clicked:connect(onClicked)
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
09 Aug 2011 06:33 PM
Sometimes to fix local scripts you just need to use another script to change their parent, not even if it's the same parent.
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
09 Aug 2011 06:33 PM
Naa, It didn't work because script loaded before character -.-' I probably configured your script in...

Sorry :/
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
09 Aug 2011 06:34 PM
@BELLY

Do I know you? If I do sorry I can't remember and in your case learn about :TweenPosition()
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
09 Aug 2011 06:34 PM
I probably haven't configured your script in properly I meant...
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
09 Aug 2011 06:35 PM
wait, are u repliing to my post? :P
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
09 Aug 2011 06:35 PM
rate its me from scripting forum. u reply to my moving GUI topic
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
09 Aug 2011 06:36 PM
Yep.
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
09 Aug 2011 06:36 PM
wats tweet potion?
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
09 Aug 2011 06:37 PM
do i add it to my script?
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
09 Aug 2011 06:38 PM
sdf i really need ur help :P
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 7Go to page: 1, 2, 3 ... 6, 7 Next
 
 
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