Eddy3D
|
  |
| Joined: 21 Nov 2010 |
| Total Posts: 3017 |
|
|
| 21 Jan 2013 11:39 AM |
function h(hit) local g = game.Players.GetPlayerFromCharacter(h.Parent) local m = Instance.new("Message") m.Parent = g.PlayerGui m.Text = "You touched me e_e..." wait(3) m:Remove() end
script.Parent.onTouched:connect(h)
Whats the mistake?
I'm Superman ~(/'-')/ |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 21 Jan 2013 11:40 AM |
function h(hit) if hit.Parent:FindFirstChild("Humanoid") then local g = game.Players.GetPlayerFromCharacter(hit.Parent) local m = Instance.new("Message") m.Parent = g.PlayerGui m.Text = "You touched me e_e..." wait(3) m:Remove() end end
|
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 21 Jan 2013 11:41 AM |
g = game.Players:GetPlayerFromCharacter(hit.Parent.Name)
Was that your mom? Tell her she needs to exercise a little more, those legs had a little flab. |
|
|
| Report Abuse |
|
|
Eddy3D
|
  |
| Joined: 21 Nov 2010 |
| Total Posts: 3017 |
|
|
| 21 Jan 2013 11:56 AM |
They both didn't work...
I'm Superman ~(/'-')/ |
|
|
| Report Abuse |
|
|
megaguy44
|
  |
| Joined: 28 Sep 2008 |
| Total Posts: 1066 |
|
|
| 21 Jan 2013 12:03 PM |
function h(hit) local g = game.Players.GetPlayerFromCharacter(hit.Parent) if (g) then local m = Instance.new("Message") m.Parent = g.PlayerGui m.Text = "You touched me e_e..." wait(3) m:Remove() end end
script.Parent.Touched:connect(h) -- You had "onTouched"
print('Hello World!') |
|
|
| Report Abuse |
|
|
Eddy3D
|
  |
| Joined: 21 Nov 2010 |
| Total Posts: 3017 |
|
|
| 21 Jan 2013 12:06 PM |
Hmm It still didn't work. I insert the script inside the part but it's no working...
I'm Superman ~(/'-')/ |
|
|
| Report Abuse |
|
|
megaguy44
|
  |
| Joined: 28 Sep 2008 |
| Total Posts: 1066 |
|
|
| 21 Jan 2013 12:08 PM |
-- Allow me to try this again, script.Parent.Touched:connect(function(Hit) local Player = game:GetService("Players"):GetPlayerFromCharacter(Hit.Parent) if (Player and Player:FindFirstChild("PlayerGui") and not Player:FindFirstChild("Use")) then Instance.new("BoolValue", Player).Name = "Use" local Message = Instance.new("Message", Player.PlayerGui) Message.Text = "You touched me, qq" wait(3) if (Message) then Message:Destroy() end if (Player:FindFirstChild("Use")) then Player.Use:Destroy() end end end)
print('Hello World!') |
|
|
| Report Abuse |
|
|
Eddy3D
|
  |
| Joined: 21 Nov 2010 |
| Total Posts: 3017 |
|
|
| 21 Jan 2013 12:10 PM |
k That one worked thanks.
I'm Superman ~(/'-')/ |
|
|
| Report Abuse |
|
|