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 
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
10 Aug 2011 11:41 AM
This works in Play Solo but not in an actual game server:

How come?

time = 15

while true do
a = game.Players:GetChildren()
for i = 1, #a do
b = game.Lighting.TextAdder:clone()
b.Parent = a[i].PlayerGui
repeat time = time - 1 wait(1)
until b.EnterClicked.Value == true or time == 0
time = 15
b:remove()
print("Changed")
end end

What it is supposed to do: One player will have the GUI. The GUI should stay on there screen until A. The player clicks enter or B. 15 seconds passes. At that point, the GUI goes to the next players screen and so on.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 11:42 AM
"Okay, well I have a script for a good message, but I have no idea how to get it to activate when a player hits the brick."

If you have a bit of code, it's possible that just doing this:

function touch()
[code]
end
script.Parent.Touched:connect(touch)

will turn it into a touch script. See if that works.
Report Abuse
BANDICOOT4000 is not online. BANDICOOT4000
Joined: 16 Dec 2008
Total Posts: 526
10 Aug 2011 11:43 AM
Thanks. I'll let you know what I get.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 11:45 AM
Impressively late posted there. Okay mmm

@BANDICOOT: Okay, your script is more complex than I thought. I won't be able to help because it's part of some bigger system and it's not really a script fix so much as an edit.

@obedient: Try testing it by hitting the little arrow shaped play button in studio.
Report Abuse
BANDICOOT4000 is not online. BANDICOOT4000
Joined: 16 Dec 2008
Total Posts: 526
10 Aug 2011 11:50 AM
Yeah I went to try it and it made no difference. I think the script i have is too complicated for me... -_- That's why I was wondering if you would be able to tell me what to add to it or help me come up with a new less complicated one. Since you already said you weren't here to make scripts, I guess I'll have to look for help somewhere else... :(
Report Abuse
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
10 Aug 2011 11:59 AM
It doesn't run the script.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 12:02 PM
What's the error?
Report Abuse
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
10 Aug 2011 12:04 PM
No error.. I set it to print the time, and it does that in play solo, but when I press play, it just says its loaded or whatever. It might be freezing.. I will have a better internet connection tonight so I'll try it again then and see if it works when I click play.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 12:08 PM
Ahhhhh, I see what's happening. That's actually kinda funny. When there are no players in the server, the while loop just goes round in a circle ad infinitum and probably crashes. Just stick a wait() at the beginning of the loop and see if it works then.
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Aug 2011 12:28 PM
@BAND

Im not really a good scripter but...
you put the gui starting in Hello! right? ok and you put it in StarterGui file too right? ok. if it doesnt wrk, (its 95% about not going to) send me bak the output:


[GuiButton Name Here. Take away the []'s] = game.StarterGui.TextButton
wait(3)
[GuiButton Name Here.].Text = new.Text"What's Your Name?" -- change this to what you want.
wait(3)
game.StarterGui.remove.[GuiButton Name Here]
end
Report Abuse
BANDICOOT4000 is not online. BANDICOOT4000
Joined: 16 Dec 2008
Total Posts: 526
10 Aug 2011 12:48 PM
That wasn't really what the problem was, but don't worry. I'm getting a completely new script right now. I've got some help already. Thanks anyway. :)
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 02:44 PM
Okai then. Any other questions?
Report Abuse
RobloxInstructive is not online. RobloxInstructive
Joined: 04 Jun 2010
Total Posts: 1175
10 Aug 2011 02:50 PM
for i = 1, 2.3, 0.1 do
door.CFrame = CFrame.new(door.Position+Vector3.new(0,i,0))
wait(0.1)
end

If I want a brick that is 17 studs high to move at 0.2 studs every 0.1 seconds, then what would the numbers be? I want the door to move up 17 studs high.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 02:53 PM
From 0 to 17 in increments of 0.2? I guess you could do

for i = 0.2, 17, 0.2 do

and add 0.2 to the height each time. You wouldn't even need to use i. In fact, you could do

for i = 1, 65 do

and add 0.2 each time, just to make the loop easier to read.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
10 Aug 2011 03:05 PM
wn't werk

print("fix dis plz")
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 03:15 PM
@Mario:

This script appears fully functional - I can't seem to identify any particular errors, so I assume there's a bug that causes it to do something other than you wanted. It looks to me that the script prints the string "fix dis plz". Was that what you intended to happen?
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Aug 2011 03:20 PM
UDim2
So none of my click go away scripts wrk. will this one wrk? its an auto go-away (i made it up on just this post)


StartingButton = game.StarterGui.TextButton
wait(3)
StartingButton.Position = UDim2.new(0, 200 0, 320)
(--and so on...)
game.StarterGui.remove:StartingButton

I know this is not going to work... is anything wrong with it?
Report Abuse
DtimX is not online. DtimX
Joined: 06 Feb 2010
Total Posts: 447
10 Aug 2011 03:21 PM
I got a Rain script off the wiki, but all it does is slow my place down so much that you cant do anything. (build mode) in online server it wont even load, it says you have lost connection.

while true do
wait(0.1)
droplet = game.Workspace.Drop:clone()
droplet.Parent = game.Workspace
droplet.Anchored = false
droplet.Position = Vector3.new(math.random(-512,512),100,math.random(-512,512))
end

Whats wrong?
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
10 Aug 2011 03:22 PM
Lawl, unexpected response is unexpected
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
10 Aug 2011 03:28 PM
The hint nevers goes away

function brick()
a = Instance.new("Hint",Workspace)
a.Text = "Hello!"
wait(3)
a:Remove()
end
script.Parent.Touched:connect(brick)
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
10 Aug 2011 03:30 PM
I got here first :D


d = true

function brick()
if not d then return end
d = false
a = Instance.new("Hint",Workspace)
a.Text = "Hello!"
wait(3)
a:Remove()
d = true
end
script.Parent.Touched:connect(brick)
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
10 Aug 2011 03:35 PM
How do I have it say more than one message?
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
10 Aug 2011 03:38 PM
Also thanks it goes away now
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
10 Aug 2011 04:05 PM
d = true

function brick()
if not d then return end
d = false
a = Instance.new("Hint",Workspace)
a.Text = "Hello!"
wait(3)
a.Text = "Bye!"
wait(3)
a:Remove()
d = true
end
script.Parent.Touched:connect(brick)
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Aug 2011 04:37 PM
Noone answered my post... @ creator of topic
Srry if I'm being rude or spamming ur topic but I need a differ script. This time I want the GUI to automaticly go away after 3 seconds. Can you tell me what wrong on the script? (it's the last post I did.)
Report Abuse
Previous Thread :: Next Thread 
Page 3 of 7Go to page: 1, 2, 3, 4 ... 6, 7 Prev 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