|
| 11 Aug 2016 04:14 PM |
I get an error "attempt to index local 'land'(a function value)"
object.Parent = workspace local land = findPos-- this is a value function if land ~= nil then object.PrimaryPart.CFrame = land.CFrame --HERE I get an error else print("Error") end |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2016 04:18 PM |
If land is a function, then functions don't have CFrames and you can't do that. Did you mean to call it first?
land().CFrame
|
|
|
| Report Abuse |
|
|
fixylol
|
  |
| Joined: 14 Dec 2012 |
| Total Posts: 7412 |
|
|
| 11 Aug 2016 04:18 PM |
that's because you're setting the value of "land" to findPos, which is a function. if you want to set the value of land to the value that findPos returns, you need to call it like a function.
Number of times my opinion changed: Alot. |
|
|
| Report Abuse |
|
|