|
| 05 Nov 2011 10:10 PM |
bool = false target = game.Workspace.End1 script.Parent.Touched:connect(function(hit) local hum = hit.Parent:findFirstChild("Humanoid") if hum ~= nil and not bool then bool = true local fold = game.Players:findFirstChild(hit.Parent.Name):findFirstChild("PlayerGui") local holder = fold:findFirstChild("Loader") local gui = holder.Frame for i = 1, 0, -0.1 do gui.BackgroundTransparency = i wait(.05) end local plyr = hit.Parent:findFirstChild("Torso") local posi = target.Position local num = tostring("1") local x1 = getfenv(1)[Posi..Num].x -- 17 local y1 = getfenv(1)[Posi..Num].y local z1 = getfenv(1)[Posi..Num].z xp = x1 + 2 zp = z1 + 2 yp = y1 + 2 local c = plyr.CFrame local x2 = 0 local y2 = y local z2 = 0 c.CFrame = CFrame.new(Vector3.new(xp,yp,zp), Vector3.new(x2,y2,z2)) wait(2.5) for v = 0, 1, 0.1 do gui.BackgroundTransparency = v wait(.2) end bool = false end end)
Error: Sat Nov 05 22:59:55 2011 - Workspace.Part.Script:17: attempt to concatenate global 'Posi' (a nil value)
Why can't I put it in a chain? |
|
|
| Report Abuse |
|
|
| |
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 05 Nov 2011 10:22 PM |
ermmm
Lua is case sensitive, bro |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 10:23 PM |
| Try using a lower case. Use posi instead of Posi |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 10:24 PM |
@Blocco
I didn't realize what you meant until I looked back at the variables, rofl.
Now it's giving me this:
Sat Nov 05 23:23:49 2011 - Workspace.Part.Script:17: attempt to concatenate local 'posi' (a userdata value)
|
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 05 Nov 2011 10:26 PM |
I don't understand what you're trying to do....
You want it to index "x, y, z1"? |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 10:32 PM |
@Blocco
What you're asking makes no sense? I'm trying to retrieve the stack level(position in terms) of the brick the players will be moved to. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 05 Nov 2011 10:33 PM |
| Your code makes little to no sense. |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 10:34 PM |
@Blocco
If it makes no sense, then why don't you help me with it instead of bickering you pest? |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 05 Nov 2011 10:35 PM |
| I can't figure out what you want to do |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 10:36 PM |
@Blocco
It's right in the title.. "player steps on a brick it teleports them?" |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 05 Nov 2011 10:37 PM |
You're doing things incorrectly:
"local c = plyr.CFrame local x2 = 0 local y2 = y local z2 = 0 c.CFrame = CFrame.new(Vector3.new(xp,yp,zp), Vector3.new(x2,y2,z2))"
the CFrame object does not have a CFrame property. |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 10:41 PM |
@Blocco
But that doesn't have anything to do with the error I'm getting currently. o_o |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 05 Nov 2011 10:42 PM |
| I know, but as a Preprocessing Replying Intergalactic Cyborg of Kindness (PRICK), it is my duty to tell you every and any error in your code. |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Nov 2011 10:47 PM |
| I'm about to go to Scripters. D: |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 05 Nov 2011 10:49 PM |
wow
you joined exactly three years after I did. What are the odds |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2011 10:49 PM |
@blocco
very slim odds i guess |
|
|
| Report Abuse |
|
|