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 » Scripting Helpers
Home Search
 

Re: How would I..

Previous Thread :: Next Thread 
Goulstem is not online. 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 is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Jan 2014 10:32 PM
Bump
Report Abuse
Goulstem is not online. 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 is not online. 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 is not online. 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 is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Jan 2014 10:40 PM
Thank you
Report Abuse
Goulstem is not online. 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 is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
19 Jan 2014 10:42 PM
yes
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Jan 2014 10:44 PM
Mkay thanks :)
Report Abuse
SkyNight56 is not online. SkyNight56
Joined: 06 Sep 2009
Total Posts: 191
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 is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
19 Jan 2014 10:46 PM
You mean a BillboardGui?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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