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: Non-Tool Dragger

Previous Thread :: Next Thread 
DevUndead is not online. DevUndead
Joined: 24 Jul 2014
Total Posts: 558
15 Aug 2015 07:19 PM
I need some src, or a method of how I can make a NON-TOOL dragger function. This is for placing objects found in a survival game. Cheers
Report Abuse
awotn is not online. awotn
Joined: 01 Nov 2014
Total Posts: 226
15 Aug 2015 07:23 PM
posted this one on your other post.

took me a few mins



local Player = game.Players.LocalPlayer
local Character = Player.Character
local Mouse = Player:GetMouse()
local Camera = workspace.CurrentCamera

local UIS = game:GetService('UserInputService')

local Object = nil

UIS.InputBegan:connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Q and Object == nil then -- insert obj into cam
Object = Instance.new('Part', Camera)
Object.Anchored = true
Mouse.TargetFilter = Object
elseif Input.KeyCode == Enum.KeyCode.E and Object ~= nil then -- set obj in workspace
local Subject = Object:clone()
Subject.Parent = workspace
Subject.CFrame = Object.CFrame

Object:Destroy()
Object = nil
Mouse.TargetFilter = nil
elseif Input.KeyCode == Enum.KeyCode.Q and Object == nil then -- delete obj
Object:Destroy()
Object = nil
Mouse.TargetFilter = nil
end
end)

game:GetService('RunService').RenderStepped:connect(function()
if Object ~= nil then
Object.CFrame = CFrame.new(Mouse.Hit.p) * CFrame.new(0, Object.Size.Y/2, 0)
end
end)
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