of     2   
chevron_rightchevron_rightchevron_right

RTSx1
#141161984Tuesday, July 22, 2014 1:53 PM GMT

Is it possible to put a model in a certain position? My commented line is where I'm having trouble (line 7). I just want to know how to do this. Thanks! local lPlayer = game.Players.LocalPlayer local mouse = lPlayer:GetMouse() local pOBJ = lPlayer:WaitForChild("OBJ_Val") mouse.Button1Down:connect(function() local obj = game.Lighting:FindFirstChild(pOBJ.Value) --obj.Position = mouse.Hit.p end) "I can't change the direction of the wind, but I can adjust my sails to always reach my destination."
cntkillme
#141162158Tuesday, July 22, 2014 1:56 PM GMT

obj:MoveTo(mouse.Hit.p)
RTSx1
#141162663Tuesday, July 22, 2014 2:06 PM GMT

Thanks, but it returns "10:05:36.622 - pOBJ is not a valid member of Lighting" local lPlayer = game.Players.LocalPlayer local mouse = lPlayer:GetMouse() local pOBJ_Val = lPlayer:WaitForChild("OBJ_Val") local pOBJ = pOBJ_Val.Value mouse.Button1Down:connect(function()     local obj = game.Lighting.pOBJ     obj:MoveTo(mouse.Hit.p) end)
RTSx1
#141162818Tuesday, July 22, 2014 2:09 PM GMT

Bump
warspyking
#141162941Tuesday, July 22, 2014 2:11 PM GMT

Check your hierarchy, and check for typos. pOBJ does not exist in game.Lighting
FroggoBLOX
#141163616Tuesday, July 22, 2014 2:25 PM GMT

Might it be that the script loaded before pOBJ did?
RTSx1
#141163788Tuesday, July 22, 2014 2:28 PM GMT

I think it is because the script took pOBJ literally. I want it to find whatever the value of pOBJ is, in this case, "Chair". I want it to find the model "Chair" in lighting.
warspyking
#141164227Tuesday, July 22, 2014 2:36 PM GMT

If it's a StringValue; local lPlayer = game.Players.LocalPlayer local mouse = lPlayer:GetMouse() local pOBJ_Val = lPlayer:WaitForChild("OBJ_Val") local pOBJ = pOBJ_Val.Value mouse.Button1Down:connect(function() local obj = game.Lighting[pOBJ] obj:MoveTo(mouse.Hit.p) end) If it's an ObjectValue; local lPlayer = game.Players.LocalPlayer local mouse = lPlayer:GetMouse() local pOBJ_Val = lPlayer:WaitForChild("OBJ_Val") local pOBJ = pOBJ_Val.Value mouse.Button1Down:connect(function() local obj = pOBJ obj:MoveTo(mouse.Hit.p) end)
RTSx1
#141164336Tuesday, July 22, 2014 2:38 PM GMT

Thanks, its a StringValue, but none of them work
RTSx1
#141164675Tuesday, July 22, 2014 2:44 PM GMT

bump
RTSx1
#141167073Tuesday, July 22, 2014 3:19 PM GMT

b2
BothAngles
#141167618Tuesday, July 22, 2014 3:27 PM GMT

ur function is missing an arg and u didnt clone the model and change its parent and u need Workspace:ClearAllChildren()
RTSx1
#141167840Tuesday, July 22, 2014 3:30 PM GMT

local lPlayer = game.Players.LocalPlayer local mouse = lPlayer:GetMouse() local pOBJ_Val = lPlayer:WaitForChild("OBJ_Val") local pOBJ = pOBJ_Val.Value      mouse.Button1Down:connect(function(pC)     local obj = game.Lighting.pOBJ:Clone()     obj.Parent = game.Workspace     obj:MoveTo(mouse.Hit.p) end) Still has same error but thanks
BothAngles
#141167925Tuesday, July 22, 2014 3:31 PM GMT

cant believe u dont see that error lmao
RTSx1
#141167980Tuesday, July 22, 2014 3:32 PM GMT

What do I do?
cntkillme
#141168021Tuesday, July 22, 2014 3:32 PM GMT

local obj = game.Lighting[pOBJ]:Clone()
RTSx1
#141168090Tuesday, July 22, 2014 3:33 PM GMT

local lPlayer = game.Players.LocalPlayer local mouse = lPlayer:GetMouse() local pOBJ_Val = lPlayer:WaitForChild("OBJ_Val") local pOBJ = pOBJ_Val.Value      mouse.Button1Down:connect(function(pC)     local obj = game.Lighting[pOBJ]:Clone()     obj.Parent = game.Workspace     obj:MoveTo(mouse.Hit.p) end) It says " is not a valid member of lighting"
BothAngles
#141168227Tuesday, July 22, 2014 3:35 PM GMT

nobody help this guy anymore ok
RTSx1
#141168280Tuesday, July 22, 2014 3:36 PM GMT

:/
warspyking
#141169106Tuesday, July 22, 2014 3:47 PM GMT

What is pOBJ?
RTSx1
#141169579Tuesday, July 22, 2014 3:53 PM GMT

The value of a string value
BothAngles
#141169866Tuesday, July 22, 2014 3:57 PM GMT

local lPlayer = game.Players.LocaIPlayer local mouse = IPlayer:GetMouse() local pOBJ_Val = IPlayer:WaitForChild("OBJ_VaI") local pOBJ = pOBJ_Val.Value mouse.Button1Down:connect(function(pC) local obj = game.Lighting.pOBJ:Clone() obj.Parent = game.Worksqace obj:MoveTo(mouse.Hit.p) end) tested and it works
RTSx1
#141170213Tuesday, July 22, 2014 4:02 PM GMT

Thanks, but thats the same thing
warspyking
#141170688Tuesday, July 22, 2014 4:07 PM GMT

What IS the value -_-
RTSx1
#141170757Tuesday, July 22, 2014 4:08 PM GMT

Chair

    of     2   
chevron_rightchevron_rightchevron_right