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 » Scripters
Home Search
 

Re: Finding Who the name of the Player who touched the block

Previous Thread :: Next Thread 
DevDeadly3652 is not online. DevDeadly3652
Joined: 17 Nov 2011
Total Posts: 465
28 Dec 2015 12:13 PM
ok so a player touches a block on the ground how do i find their name and clone a Gui in them ????
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
28 Dec 2015 12:18 PM
Part.Touched:connect(function(Hit)
local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
if Hit.Parent then
local PlayerGui = Player:WaitForChild("PlayerGui")

-- code
-- good luck

end
end)
Report Abuse
USADefender is not online. USADefender
Joined: 27 Jun 2011
Total Posts: 1674
28 Dec 2015 12:19 PM
Part = game.Workspace.Part --Part, change this to it's directory
GuiSample = game.ReplicatedStorage.Gui --The gui, change this to it's directory
Part.Touched:connect(function(Object) --When the object touches, it'll fire
if Object.Parent:FindFirstChild("Humanoid") then --We'll check if it is an actual player
Gui = GuiSample:Clone() --Clone the GUi
Gui.Parent = game.Players:FindFirstChild(Object.Name).PlayerGui --Parent it to the player's PlayerGui
end
end)
Report Abuse
DevDeadly3652 is not online. DevDeadly3652
Joined: 17 Nov 2011
Total Posts: 465
28 Dec 2015 12:19 PM
Forgot to mention Locally this script is Local it is in player
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
28 Dec 2015 12:20 PM
Why is this a localscript?
Report Abuse
DevDeadly3652 is not online. DevDeadly3652
Joined: 17 Nov 2011
Total Posts: 465
28 Dec 2015 12:35 PM
Workspace.Player1.ClickTst.ClickTST 1:37: bad argument #3 to 'Value' (string expected, got nil)

f.Value = game.Players:FindFirstChild(hit.Name)


r.Touched:connect(function(hit)
f.Value = game.Players:FindFirstChild(hit.Name)
end)
Report Abuse
DevDeadly3652 is not online. DevDeadly3652
Joined: 17 Nov 2011
Total Posts: 465
28 Dec 2015 01:48 PM
anybody :/
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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