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 » Scripters
Home Search
 

Re: Tool is creating a part and putting it on my head.

Previous Thread :: Next Thread 
fierydragonkeeper is not online. fierydragonkeeper
Joined: 08 Oct 2012
Total Posts: 1192
05 Mar 2015 10:38 AM
I made a tool and when to click it will make a part and a bodyposition and I set the bodyposition's position to mouse.hit.p but it won't go?
Report Abuse
fierydragonkeeper is not online. fierydragonkeeper
Joined: 08 Oct 2012
Total Posts: 1192
05 Mar 2015 10:39 AM
local part = Instance.new("Part", game.Workspace)
part.TopSurface = Enum.SurfaceType.Smooth
part.BottomSurface = Enum.SurfaceType.Smooth
part.Size = Vector3.new(5,5,5)
part.Position = script.Parent.Handle.Position
part.BrickColor = BrickColor.new("Toothpaste")
part.CanCollide = false

local bp = Instance.new("BodyPosition", part)
bp.position = mouse.hit.p
--bp.maxForce = Vector3.new(400000, 400000, 400000)
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
05 Mar 2015 10:45 AM
Is "mouse" defined?

Also, mouse.Hit.p
Report Abuse
fierydragonkeeper is not online. fierydragonkeeper
Joined: 08 Oct 2012
Total Posts: 1192
05 Mar 2015 10:54 AM
Yes it is in the equipped function
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
05 Mar 2015 11:31 AM
You can't get the mouse from a normal script.
Report Abuse
fierydragonkeeper is not online. fierydragonkeeper
Joined: 08 Oct 2012
Total Posts: 1192
05 Mar 2015 02:43 PM
Ik it's in a local script.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
05 Mar 2015 03:00 PM
Did you try mouse.Hit.p?

You didn't capitalise "Hit"
Report Abuse
fierydragonkeeper is not online. fierydragonkeeper
Joined: 08 Oct 2012
Total Posts: 1192
05 Mar 2015 03:04 PM
They both have the same effect.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
05 Mar 2015 03:15 PM
Try this:

Mouse = game.Players.LocalPlayer:GetMouse()
part.Position = Mouse.Hit.p
Report Abuse
fierydragonkeeper is not online. fierydragonkeeper
Joined: 08 Oct 2012
Total Posts: 1192
06 Mar 2015 09:00 AM
I don't really know what was wrong with it but I think it was too big so I made it smaller and made it grow overtime. And the way I am getting the mouse is:


script.Parent.Equipped:connect(function (mouse)


end)
Report Abuse
fierydragonkeeper is not online. fierydragonkeeper
Joined: 08 Oct 2012
Total Posts: 1192
06 Mar 2015 09:01 AM
With a tool.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
06 Mar 2015 09:05 AM
It has to be inside a localscript, NOT a normal script.

script.Parent.Equipped:connect(function (mouse)
mouse.Button1Down:connect(function()
local part = Instance.new("Part", workspace).Position = mouse.Hit.p
end)
end)
Report Abuse
fierydragonkeeper is not online. fierydragonkeeper
Joined: 08 Oct 2012
Total Posts: 1192
06 Mar 2015 04:17 PM
IT IS INSIDE A LOCAL SCRIPT CAN'T YOU READ????
Report Abuse
CardboardRocks is not online. CardboardRocks
Joined: 25 Dec 2011
Total Posts: 411
06 Mar 2015 04:21 PM
He's trying to help you, be nice.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
06 Mar 2015 04:39 PM
I can read, but I've been told the complete opposite of what people mean before. Anyway, what I have you should work.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
06 Mar 2015 04:44 PM
I don't think that if u Click in the Sky u'll get the Position...
just sayin if u do sometimes Click on the Sky...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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