sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 30 Aug 2011 09:41 AM |
i made this script a while ago but nobody ever answered me so i decided to remake it after toying around with it and actually getting a bit of output....heres the output: Workspace.Player.Gun.LocalScript:6: bad argument #1 to 'new' (Vector3 expected, got userdata) Tue Aug 30 09:41:00 2011 - Script "Workspace.Player.Gun.LocalScript", Line 6 Tue Aug 30 09:41:00 2011 - stack end
heres the script:
local Tool = script.Parent local User = Tool.Parent Tool.Equipped:connect(function(mouse) mouse.Button1Down:connect(function() wait(0.1) User.Tank.Tanksystems.front.CFrame = User.Tank.Tanksystems.front.CFrame * CFrame.new(User.Tank.Tanksystems.Placer.CFrame, mouse.Hit.p) User.Tank.Tanksystems.Barrel.CFrame = User.Tank.Tanksystems.front.CFrame end) end)
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 09:55 AM |
local Tool = script.Parent local User = Tool.Parent mouse.Button1Down:connect(function() wait(0.1) User.Tank.Tanksystems.front.CFrame = User.Tank.Tanksystems.front.CFrame * CFrame.new(User.Tank.Tanksystems.Placer.CFrame, mouse.Hit.p) User.Tank.Tanksystems.Barrel.CFrame = User.Tank.Tanksystems.front.CFrame end) end) Tool.Equipped:connect(function(mouse) |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 30 Aug 2011 10:01 AM |
that doesnt look right but i'll check... nope
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 30 Aug 2011 10:11 AM |
yeah you didnt really even touch it.... you only moved the (third?) line down to the bottom... didnt move the end) or do anything........
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 30 Aug 2011 10:21 AM |
anybody? please?
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 10:23 AM |
You have to multiply the Tanksystems.front.CFrame by a Vector3 value, not a CFrame Value.
User.Tank.Tanksystems.front.CFrame = User.Tank.Tanksystems.front.CFrame * Vector3.new(User.Tank.Tanksystems.Placer.CFrame, mouse.Hit.p)
Regards, ~Scarfacial |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 30 Aug 2011 10:30 AM |
what pops up now is:
Workspace.Player.Gun.LocalScript:6: bad argument #3 to '?' (CFrame expected, got userdata) Tue Aug 30 10:30:06 2011 - Script "Workspace.Player.Gun.LocalScript", Line 6 Tue Aug 30 10:30:06 2011 - stack end
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 30 Aug 2011 10:34 AM |
Scar, you multiply a cframe value by a cframe value
change this line
User.Tank.Tanksystems.Placer.CFrame
to
User.Tank.Tanksystems.Placer.Position
dun know if it will do anything, I was tired so tl;br |
|
|
| Report Abuse |
|
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 30 Aug 2011 10:35 AM |
| and revert from the changes scar told you to make :) |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 30 Aug 2011 10:39 AM |
well, i have no output.... but the problem is.. its not working... i guess i forgot to say that its supposed to cframe itself to face where you click.....
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 30 Aug 2011 10:54 AM |
is there anything thats missing?
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 11:03 AM |
Night, you just failed. That made the script worse. Don't help if you don't understand the script.
[Now son, don't touch that cactus!] |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 30 Aug 2011 11:07 AM |
?
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 30 Aug 2011 11:22 AM |
i'm sorry... im just getting impatient..... basicly my recent questions havnt actually been answered at all.
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
GiverLol
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 810 |
|
|
| 30 Aug 2011 11:35 AM |
| If Tool = script.Parent then player = script.Parent.Parent ;) |
|
|
| Report Abuse |
|
|
GiverLol
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 810 |
|
| |
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
| |
|
|
| 30 Aug 2011 11:38 AM |
@Giver
I'm sorry, what? ._.
[Now son, don't touch that cactus!] |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
| |
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
| |
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 31 Aug 2011 08:43 PM |
whyj00noanswer?
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 01 Sep 2011 04:01 PM |
ok seriously? why doesnt anybody answer this? its been a few days and i HATE bumping!
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|
sysmic
|
  |
| Joined: 19 Mar 2010 |
| Total Posts: 383 |
|
|
| 01 Sep 2011 04:27 PM |
ugh.....
~The post above me is RObbish, The post below me is RObbish~ |
|
|
| Report Abuse |
|
|