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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Doesn't work.

Previous Thread :: Next Thread 
ThisUserSecret is not online. ThisUserSecret
Joined: 29 Sep 2012
Total Posts: 1094
02 Apr 2014 06:59 PM
What's wrong with this script?

x=game.Workspace.Tele
function touched(lol)
lol.Parent.Parent:MoveTo(x.Position)
end
script.Parent.Touched:connect(touched)
Report Abuse
ThisUserSecret is not online. ThisUserSecret
Joined: 29 Sep 2012
Total Posts: 1094
02 Apr 2014 07:09 PM
Anyone? It's a really simple script, I just don't know why it wont work.
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
02 Apr 2014 07:15 PM
It probably errors when a a part in the workspace touches it (game doesn't have a moveto function)
You'd better check to see if there is a humanoid\

functino touched(p)
local h = p.Parent:FindFirstChild("Humanoid")
if h then
p.Parent:MoveTo(x.Position)
end
end
Report Abuse
ThisUserSecret is not online. ThisUserSecret
Joined: 29 Sep 2012
Total Posts: 1094
02 Apr 2014 07:21 PM
Nothing happens with your script. But with mine, a lot of lag occurs when I touch it.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
02 Apr 2014 07:23 PM
Add a debounce.
http://wiki.roblox.com/index.php?title=Debounce
Report Abuse
ThisUserSecret is not online. ThisUserSecret
Joined: 29 Sep 2012
Total Posts: 1094
02 Apr 2014 07:27 PM
I just tried, it didn't work either. I don't know why it's not working, it did earlier today on another block. Also this block is invisible if that means anything.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
02 Apr 2014 07:28 PM
What do you mean by not working? The script won't execute, or the lag continues?
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
02 Apr 2014 07:33 PM
local db = false

script.Parent.Touched:connect(function(hit)
if db == false then db = true end
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
hit.Parent.Torso.CFrame = CFrame.new(game.Workspace.Tele.Position+Vector3.new(0,3,0))
db = false
end end)
Report Abuse
ThisUserSecret is not online. ThisUserSecret
Joined: 29 Sep 2012
Total Posts: 1094
02 Apr 2014 07:39 PM
Thank you goul, I don't know why it wouldn't work, I mean it did this morning. I bet there's a simpler way to do it.
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