generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

whats the problem with this script?

Previous Thread :: Next Thread 
sysmic is not online. 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
nightmare3o is not online. nightmare3o
Joined: 21 Jun 2008
Total Posts: 956
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 is not online. 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 is not online. 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 is not online. 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
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
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 is not online. 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 is not online. 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 is not online. 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 is not online. GiverLol
Joined: 20 Dec 2010
Total Posts: 810
30 Aug 2011 11:36 AM
I gues*
Report Abuse
sysmic is not online. sysmic
Joined: 19 Mar 2010
Total Posts: 383
30 Aug 2011 11:37 AM
//?
Report Abuse
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
30 Aug 2011 11:38 AM
@Giver

I'm sorry, what? ._.

[Now son, don't touch that cactus!]
Report Abuse
sysmic is not online. sysmic
Joined: 19 Mar 2010
Total Posts: 383
30 Aug 2011 12:05 PM
i dont know either...
Report Abuse
sysmic is not online. sysmic
Joined: 19 Mar 2010
Total Posts: 383
30 Aug 2011 06:50 PM
?
Report Abuse
sysmic is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image