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 » Game Design
Home Search
 

FIX THIS ERROR!!!

Previous Thread :: Next Thread 
alextubba is not online. alextubba
Joined: 13 May 2013
Total Posts: 7
05 Mar 2017 07:03 PM

Error:

20:01:54.986 - Unable to cast double to Vector3

SCRIPT:


Button = script.Parent
Item = script.Parent.Item
PlayerMouse = game.Players.LocalPlayer:getMouse()
local Store = script.Parent.Parent.Parent
local Button2 = script.Parent.Parent.Parent.Parent.Frame
BasePlate = game.Workspace.BasePlate
Moved = Item.MovedValue.Value
local Nil = game.Workspace:FindFirstChild("RustyDropper")



function onClick()
Moved = false
Clone = Item:clone()
Clone.Name = "RustyDropper"
Clone.Parent = game.Workspace
ItemParts = game.Workspace.RustyDropper.Model:GetChildren()
Store.Visible = false
Button2.Visible = true
ItemParts.CanCollide = false
ItemParts.Transparency = .8
end
PlayerMouse.Move:connect(function()
local PlayerMousePositions = PlayerMouse.Target.Position.y
PlayerMousePositions = 2
if PlayerMouse.Target.Name == "BasePlate" then
if Moved == false then
local PlayerMousePosition = PlayerMouse.Hit.x
local PlayerMousePositionss = PlayerMouse.Hit.z
local PlayerMousePositions = math.ceil(PlayerMousePosition)
local PlayerMousePositionss = math.ceil(PlayerMousePositions)
local PlayerMousePositionsss = math.ceil(PlayerMousePositionss)
Clone:MoveTo(PlayerMousePositions , PlayerMousePositionss , PlayerMousePositionsss)
end
end
end)
PlayerMouse.Button1Down:connect(function()
ItemParts.CanCollide = true
Moved = true
end)


Button.MouseButton1Click:connect(onClick)
Report Abuse
kjake43607 is not online. kjake43607
Joined: 11 Apr 2011
Total Posts: 1100
05 Mar 2017 07:07 PM
Make your variables local to start. Does it tell you what line the error is?
Report Abuse
alextubba is not online. alextubba
Joined: 13 May 2013
Total Posts: 7
06 Mar 2017 06:11 AM
No
Report Abuse
alextubba is not online. alextubba
Joined: 13 May 2013
Total Posts: 7
06 Mar 2017 06:37 AM
The line is 33

or

Clone:MoveTo(PlayerMousePositions, PlayerMousePositionss, PlayerMousePositionsss)
Report Abuse
kjake43607 is not online. kjake43607
Joined: 11 Apr 2011
Total Posts: 1100
06 Mar 2017 10:37 AM
i think its because your trying to position a vector 2 with 3 dimensions. get rid of the PlayerMousePositionsss
Report Abuse
alextubba is not online. alextubba
Joined: 13 May 2013
Total Posts: 7
06 Mar 2017 04:46 PM
It has the same error if I do that. Do you know a way to combine the values so I make it 1 variable. I already tried - Local MouseAllPositions = ("PlayerMousePositions ," .. "PlayerMousePositionss ," .. "PlayerMousePositionsss")
But that just takes the words and combines them so how would I make it read them as a variable?
Report Abuse
ytrewq987 is not online. ytrewq987
Joined: 06 Nov 2016
Total Posts: 6
06 Mar 2017 06:41 PM
Clone:MoveTo(Vector3.new(PlayerMousePositions, PlayerMousePositionss, PlayerMousePositionsss))
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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