|
| 26 May 2017 12:14 AM |
function onClicked() if game.Players:FindFirstChild(script.Parent.Parent.PLAYER.Text) then game.Players:FindFirstChild(script.Parent.Parent.PLAYER.Text) end end script.Parent.MouseButton1Down:connect(onClick)
How would I go about giving a tool to the player?
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 12:16 AM |
| You'd have to ask the server, because you can't give the player a tool from a local script |
|
|
| Report Abuse |
|
|
|
| 26 May 2017 12:17 AM |
I'm not doing it in a local I completely dropped the FE idea.
|
|
|
| Report Abuse |
|
|
|
| 26 May 2017 12:17 AM |
Its a server script (dont complain please I know it's a stupid idea I'm just trying to figure it out)
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 12:17 AM |
clone the tool from a directory like ReplicatedStorage
game.ReplicatedStorage.ToolNameHere:Clone().Parent = player.Backpack |
|
|
| Report Abuse |
|
|
| |
|
Snow_Dude
|
  |
| Joined: 11 Jun 2016 |
| Total Posts: 713 |
|
|
| 26 May 2017 07:42 AM |
I scripting something 2 sec, it will be 0 R$.
|
|
|
| Report Abuse |
|
|
Snow_Dude
|
  |
| Joined: 11 Jun 2016 |
| Total Posts: 713 |
|
|
| 26 May 2017 07:47 AM |
Here's for a GUI:
local p = game.Players.LocalPlayer TOOLNAME = Your tool's name
script.Parent.MouseButton1Click:connect(function() local tool = game.ReplicatedStorage.TOOLNAME:Clone() tool.Parent = p.Backpack
end)
So, put this in a TextButton that is inside a ScreenGui and be sure that the tool is in ReplicatedStorage
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 10:27 AM |
ForceCyber stop misleading people.
|
|
|
| Report Abuse |
|
|
|
| 26 May 2017 10:39 AM |
Shut up. I know this better than you.
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 10:47 AM |
You are an insolent waste of space with the combined intelligence of a three dead mosquitos and an overripe zucchini. You, as a person, should feel bad about yourself.
Your code is godawful. Your grammar is detestable.
Do us all a huge favor and get the hell out.
|
|
|
| Report Abuse |
|
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 10:49 AM |
Go away bud, the grown-ups are talking.
|
|
|
| Report Abuse |
|
|
|
| 26 May 2017 10:50 AM |
That's why you should leave. ;)
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 10:51 AM |
Anyone who uses "to" to mean "too" should be culled from humanity.
Clearly you know nothing about anything. Why pretend when everyone else can see it?
|
|
|
| Report Abuse |
|
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 11:01 AM |
Literally go back to first grade where they teach you these things:
quoting you > "It needs to be a server script", no it doesn't need to be that. A localscript will work to." > A localscript will work to. > will work to. > to.
to preposition 1. expressing motion in the direction of (a particular location). "walking down to the mall" 2. identifying the person or thing affected. "you were terribly unkind to her"
too 1. to a higher degree than is desirable, permissible, or possible; excessively. "he was driving too fast" synonyms: excessively, overly, over, unduly, immoderately, inordinately, unreasonably, extremely, exorbitantly, very; informaltoo-too "invasion would be too risky" 2. in addition; also. "is he coming too?"
|
|
|
| Report Abuse |
|
|
|
| 26 May 2017 11:03 AM |
will work too.*
Just get off you lil rich kid.
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 11:06 AM |
There you go, you're learning! Now, apply that humility to everything else you don't understand.
Like Lua and basic networking, for example.
|
|
|
| Report Abuse |
|
|
|
| 26 May 2017 11:07 AM |
| I already said that. Lol. Get the # ### before you get banned for player abuse. |
|
|
| Report Abuse |
|
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 11:11 AM |
You're abusing all of us by continuing to post your nonsensical drivel. You are CONSTANTLY misleading new learners, and when you are corrected by people more knowledgeable than yourself, your little cave-man brain perceives it as an attack and you get offended.
If you're not going to help people, then just go to Off Topic.
I speak for everyone when I say that we really don't want you here.
|
|
|
| Report Abuse |
|
|
|
| 26 May 2017 11:24 AM |
"You are CONSTANTLY misleading new learners", then stop doing it.
|
|
|
| Report Abuse |
|
|
|
| 26 May 2017 11:25 AM |
I speak for everyone that we don't want you here. (: Go to Off Topic please.
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 May 2017 11:27 AM |
If I opened up your skull there'd be a fidget spinner where your brain is supposed to be.
|
|
|
| Report Abuse |
|
|