|
| 17 Jan 2015 05:44 PM |
| I'm trying to make a function that replicates a gear from ServerStorage and change the GripForward property but it won't work for some strange reason. |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2015 05:55 PM |
-- yes, these are Vector3Values -- yes, the hierarchy is correct
tool.GripForward = script['GripForward'].Value tool.GripPos = script['GripPos'].Value tool.GripRight = script['GripRight'].Value tool.GripUp = script['GripUp'].Value |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
jbjgang2
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 8948 |
|
|
| 17 Jan 2015 08:12 PM |
They are Vector3 values as in the object right?
if they are and it still isnt working i recommend just making them variables in the script
Swaggin' Since Twenty Ten |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 17 Jan 2015 08:19 PM |
I have no idea why that wouldn't be working if, like you said, everything was set up correctly. Try just making a function for fixing the grips, and calling it whenever the tool is equipped(:
local settings = { ["GripPos"] = Vector3.new(), ["GripRight"] = Vector3.new(), ["GripForward"] = Vector3.new(), ["GripUp"] = Vector3.new() }
function fixGrip() for i,v in pairs(settings) do if tool[i] then tool[i] = v or Vector3.new(0,0,0) end end)
tool.Equipped:connect(function(mouse) fixGrip() end) |
|
|
| Report Abuse |
|
|
|
| 18 Jan 2015 09:26 AM |
@jbi >-- yes, these are Vector3Values read |
|
|
| Report Abuse |
|
|
|
| 18 Jan 2015 09:38 AM |
| @Goul, the values are kind of weird and have a bunch of numbers. The values are close, but not close enough |
|
|
| Report Abuse |
|
|
|
| 18 Jan 2015 09:46 AM |
Are they in Radians or Degrees? Remember, the ToolGrip stuff is very similar to the rotation matrix of a CFrame.
I would use CFrames, they are easier to understand for me. I mean, I wouldn't use every number for the CFrame, I would just use what needed to be used by doing CFrame.Angles.
http://wiki.roblox.com/index.php?title=API:Class/Tool/Grip |
|
|
| Report Abuse |
|
|