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 » Scripters
Home Search
 

Need help with simple scripting problem

Previous Thread :: Next Thread 
iBuildStuffz is not online. iBuildStuffz
Joined: 30 Apr 2015
Total Posts: 853
15 May 2015 08:07 PM
I am just getting started and practicing loops. Why won't this work?

function onTouched(hit)
while true do
wait(1)
msg = Instance.new("Message")
msg.Parent = game.Workplace
msg.Text = "Now we are moving along Jacob"
wait(3)
msg:Destroy()

end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
iBuildStuffz is not online. iBuildStuffz
Joined: 30 Apr 2015
Total Posts: 853
16 May 2015 08:28 AM
Bumpp
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
16 May 2015 08:34 AM
it should work but here i made it better

script.Parent.Touched:connect(function() -- se how i did that on one line?
for i = 1,math.huge do -- another way of looping
local msg = Instance.new("Message",workspace) -- parent it too while making it. Also its workspace not workplace.
msg.Text = " " == add your text
wait(3) -- wait 3 seconds
msg:Destroy() -- Destroy it
end -- connect the loop
end) -- an ) for doing it on 1 line
Report Abuse
iBuildStuffz is not online. iBuildStuffz
Joined: 30 Apr 2015
Total Posts: 853
16 May 2015 08:37 AM
Thanks! I think the only problem is it is Workspace not workplace
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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