Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 19 Jan 2014 10:27 PM |
How would I make it so if someone touches a part then a hint appears on only their screen? No one else's in the server? Something like;
script.Parent.Touched:connect(function(onTouched)
a = script.Parent:FindFirstChild("Humanoid") b = a.Parent.Parent.Parent.Parent.Parent
if (p ~= nil) then local h = Instance.new("Hint", a) --I don't know :P h.Text = "You will ascend in 5 seconds" wait(1) h.Text = "You will ascend in 4 seconds" wait(1) h.Text = "You will ascend in 3 seconds" wait(1) h.Text = "You will Ascend in 2 seconds" wait(1) h.Text = "You will ascend in 1 second" wait(1) h.Text = "Ascending..." etc..
|
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
| |
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 19 Jan 2014 10:38 PM |
| I would think this is a relatively easy question.. I just can't find it on wiki. Bump :P |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 19 Jan 2014 10:38 PM |
local db = true
script.Parent.Touched:connect(function(hit) if hit.Parent and hit.Parent:findFirstChild("Humanoid") then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr and not plr.PlayerGui:findFirstChild("H") then db = false local h = Instance.new("Hint", plr.PlayerGui) h.Name = "H" game.Debris:AddItem(h, 7) for i = 5, 0, -1 do h.Text = "You will ascend in "..i.." seconds." wait(1) end h.Text = "Ascending..." wait(2) db = true end end end)
|
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 19 Jan 2014 10:40 PM |
**
script.Parent.Touched:connect(function(hit) if hit.Parent and hit.Parent:findFirstChild("Humanoid") then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr and not plr.PlayerGui:findFirstChild("H") then local h = Instance.new("Hint", plr.PlayerGui) h.Name = "H" game.Debris:AddItem(h, 7) for i = 5, 0, -1 do h.Text = "You will ascend in "..i.." seconds." wait(1) end h.Text = "Ascending..." end end end)
|
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
| |
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 19 Jan 2014 10:42 PM |
| Wait so to make the hint seen by only the player that touched the brick I would just have to store the hint in the player's playergui? |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
| |
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
| |
|
|
| 19 Jan 2014 10:45 PM |
| you used to be able to create a Hint GUI when someone touches a brick, sorta like touching a cactus, a message would pop up and say "ouch!" or something, but the new updates with 2.0 removed it |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
| |
|