Burdhouse
|
  |
| Joined: 01 Mar 2009 |
| Total Posts: 132 |
|
|
| 23 May 2016 03:14 AM |
Is there any way to make a script where a specific person joins the game and it adds a hat onto the character? Thanks for your help, I am pretty new to scripting so I don't really know how to do much yet.
-Burdhouse
|
|
|
| Report Abuse |
|
|
Burdhouse
|
  |
| Joined: 01 Mar 2009 |
| Total Posts: 132 |
|
|
| 23 May 2016 03:16 AM |
By the way I don't mind if it takes the hat from lighting or if it uses the hat ID, I could do either.
-Burdhouse |
|
|
| Report Abuse |
|
|
Fjalon
|
  |
| Joined: 03 Feb 2016 |
| Total Posts: 1550 |
|
|
| 23 May 2016 03:16 AM |
| Maybe you put the hat in the starter pack or starter player? |
|
|
| Report Abuse |
|
|
Erediin
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 756 |
|
|
| 23 May 2016 03:20 AM |
without FE you could have a script like this:
#code game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local hat = game.ServerStorage.(Hatname):Clone() hat.Parent = character end) end)
|
|
|
| Report Abuse |
|
|
Erediin
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 756 |
|
|
| 23 May 2016 03:23 AM |
You can use it with FE sorry, I was going to write it in a localscript but this is easier and can be done with and without FE
|
|
|
| Report Abuse |
|
|
2760169
|
  |
| Joined: 17 May 2016 |
| Total Posts: 2 |
|
| |
|
Erediin
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 756 |
|
|
| 23 May 2016 04:16 AM |
Post what you copied and pasted.
|
|
|
| Report Abuse |
|
|
|
| 23 May 2016 04:35 AM |
After doing this it gives me a hat but it also gives everyone else a hat.
-Burdhouse |
|
|
| Report Abuse |
|
|
|
| 23 May 2016 04:36 AM |
| Whoops, forgot to log into my main before posting that. |
|
|
| Report Abuse |
|
|
|
| 23 May 2016 04:40 AM |
game.Players.PlayerAdded:connect(function(player) if player.Name == (yourname) then player.CharacterAdded:connect(function(character) local hat = game.ServerStorage.(Hatname):Clone() hat.Parent = character end end) end) That should work, too lazy to test it right now tho.
Loading. . . . . |
|
|
| Report Abuse |
|
|
|
| 23 May 2016 04:42 AM |
I am going to make a few minor tweaks to what the previous person gave me, if that doesn't work then I'll be sure to use that.
-Burdhouse |
|
|
| Report Abuse |
|
|
Burdhouse
|
  |
| Joined: 01 Mar 2009 |
| Total Posts: 132 |
|
|
| 23 May 2016 04:47 AM |
Doesn't seem to work, it was complaining about there being parenthesis around the hat name and didn't work with them there so I removed them and it still didn't work.
-Burdhouse |
|
|
| Report Abuse |
|
|
Burdhouse
|
  |
| Joined: 01 Mar 2009 |
| Total Posts: 132 |
|
|
| 23 May 2016 04:52 AM |
By the way it requests an identifier when the parenthesis are there and wants there to be an end on line 3 without them.
-Burdhouse |
|
|
| Report Abuse |
|
|
Erediin
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 756 |
|
|
| 23 May 2016 04:57 AM |
game.Players.PlayerAdded:connect(function(player) if player.Name == YOURNAAME then player.CharacterAdded:connect(function(character) local hat = game.ServerStorage.HATNAME:Clone() hat.Parent = character end end) end)
|
|
|
| Report Abuse |
|
|
|
| 23 May 2016 04:57 AM |
local owner = game.CreatorId local nameOfHat = "DominusEmpyreus"
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(chr) local head = chr:WaitForChild("Head") game.ServerStorage[nameOfHat]:Clone().Parent = head end) end)
put this in serverscriptservice and put the hat in serverstorage
#code R+ | local RAP = "R$509,953"; local robux = "R$14,211" |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 May 2016 05:09 AM |
welcome
everyone else was not working lol
#code R+ | local RAP = "R$509,953"; local robux = "R$14,211" |
|
|
| Report Abuse |
|
|
Erediin
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 756 |
|
|
| 23 May 2016 05:14 AM |
mine was working lol, i even tested it...
|
|
|
| Report Abuse |
|
|
2760169
|
  |
| Joined: 17 May 2016 |
| Total Posts: 2 |
|
| |
|
Burdhouse
|
  |
| Joined: 01 Mar 2009 |
| Total Posts: 132 |
|
|
| 23 May 2016 06:01 AM |
Okay so I thought it was working and it turns out it isn't. There aren't any script errors or anything, its just kind of does nothing and sits there like a rock. I tested it with the command runner thing on the server log and it literally did nothing.
-Burdhouse |
|
|
| Report Abuse |
|
|
Briicks
|
  |
| Joined: 03 Apr 2015 |
| Total Posts: 1796 |
|
|
| 23 May 2016 06:46 AM |
Change "416828455" to the id of the hat you'd like to wear.
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) if plr.Name == "Player1" or plr.Name == "Burdhouse" then game:GetService("InsertService"):LoadAsset(416828455):GetChildren()[1].Parent = char end end) end)
-Briicks |
|
|
| Report Abuse |
|
|