|
| 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 |
|
|
|
| 02 Apr 2014 07:09 PM |
| Anyone? It's a really simple script, I just don't know why it wont work. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|