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
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 183 |
|
|
| 18 Jul 2015 01:48 PM |
bump
~forks.exe has stopped working~ |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 183 |
|
|
| 18 Jul 2015 02:57 PM |
bump
~forks.exe has stopped working~ |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 183 |
|
|
| 18 Jul 2015 03:09 PM |
Does not work
~forks.exe has stopped working~ |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2015 03:13 PM |
| I just tested it and it works fine. Where is your tool? |
|
|
| Report Abuse |
|
|
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 |
|
|