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: Convert this touch script into a clicked

Previous Thread :: Next Thread 
ThraxPain is not online. ThraxPain
Joined: 14 Sep 2014
Total Posts: 183
18 Jul 2015 12:23 PM
I want this script to be a ClickDetector On Clicked instead of OnTouched

--------------------------------------------





function onTouch(hit)

local ptt = game.Players:playerFromCharacter(hit.Parent)
if ptt == nil then return end
local wfp = game.Lighting:findFirstChild("USP"):clone() --change "NameOfTheWeaponHere" to the weapon you want to give
if wfp == nil then return end
wfp.Parent = ptt.Backpack
script.Parent.Touch:Play()
script.Parent:remove()

end

script.Parent.Touched:connect(onTouch)

~forks.exe has stopped working~
Report Abuse
ThraxPain is not online. ThraxPain
Joined: 14 Sep 2014
Total Posts: 183
18 Jul 2015 01:48 PM
bump

~forks.exe has stopped working~
Report Abuse
Sharpy033 is not online. Sharpy033
Joined: 02 Jul 2008
Total Posts: 3851
18 Jul 2015 01:52 PM
function when it is clicked(click)
local ptt = game.Playe123rs:playerFromCharacter(hit.Parent)
if ptt == n123il then return end 123123
local wfp = game.Lighting:findFirstCh123ild("USP"):clone() --change "NameOfThedeeznuts" to the123 weapon you wan123t to give
if wfp ==123 nil then return end 23
wfp.Parent = ptt.123Backpack1231231
script.Parent.Touch:Play()123
script.Parent:remove()123

end

script.child.clicked:connect(deez nuts)
Report Abuse
ThraxPain is not online. ThraxPain
Joined: 14 Sep 2014
Total Posts: 183
18 Jul 2015 02:33 PM
If you arent going to help or at least make the script efficient then leave my thread and I need help.

~forks.exe has stopped working~
Report Abuse
ThraxPain is not online. ThraxPain
Joined: 14 Sep 2014
Total Posts: 183
18 Jul 2015 02:57 PM
bump

~forks.exe has stopped working~
Report Abuse
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
18 Jul 2015 03:00 PM
script.Parent.ClickDetector.MouseClick:Connect(function(clicker)
local ptt = game.Players.Clicker
if ptt == nil then return end
local wfp = game.Lighting:findFirstChild("USP"):clone() --change "NameOfTheWeaponHere" to the weapon you want to give
if wfp == nil then return end
wfp.Parent = ptt.Backpack
script.Parent.Touch:Play()
script.Parent:remove()
end)
--if siggy == false then print"nooo :(" end
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
18 Jul 2015 03:02 PM
local ClickDetector = Instance.new("ClickDetector", script.Parent)

ClickDetector.MouseClick:connect(function(Player)
local Tool = game.Lighting:FindFirstChild("USP")
if Tool then
local Clone = Tool:Clone()
Player:LoadCharacterAppearance(Clone)
script.Parent:Destroy()
end
end)

I would move the tool to ServerStorage.
Report Abuse
ThraxPain is not online. ThraxPain
Joined: 14 Sep 2014
Total Posts: 183
18 Jul 2015 03:09 PM
Does not work

~forks.exe has stopped working~
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
18 Jul 2015 03:13 PM
I just tested it and it works fine. Where is your tool?
Report Abuse
ThraxPain is not online. ThraxPain
Joined: 14 Sep 2014
Total Posts: 183
18 Jul 2015 04:31 PM
Sorry did it wrong

~forks.exe has stopped working~
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