|
| 27 Jan 2015 04:35 PM |
| Spawn in a game with a certain sword, and the others do not? |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 27 Jan 2015 04:36 PM |
http://wiki.roblox.com/index.php?title=Give_tools_to_group_members
Instead of doing:
if player:IsInGroup(groupId) then
You'll need to do:
if game.CreatorType == Enum.CreatorType.User and player.userId == game.CreatorId then |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2015 04:39 PM |
| And where would I type in my ID at? Exactly where it says id? |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 27 Jan 2015 04:40 PM |
| You don't need to type your ID, because game.CreatorId will automatically be your userId. |
|
|
| Report Abuse |
|
|
| |
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 27 Jan 2015 04:41 PM |
if player.userId == game.CreatorId then --give things
|
|
|
| Report Abuse |
|
|
|
| 27 Jan 2015 04:47 PM |
| So I put the script in ServerScriptService or ServerStorage where I put my item? |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2015 04:51 PM |
| Nevermind I got it. I forgot the name of the item, lol |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Jan 2015 05:50 PM |
@seranok
What is the point of checking the first condition? |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2015 05:56 PM |
Here's the way I have it, perhaps it's inefficient or something but it works just fine. Put the sword you want in lighting.Sword, then place this script in workspace:
game.Players.PlayerAdded:connect(function (p) if p.Name == "SinisterDoggy" then wait(1) for _,v in pairs(game.Lighting.Sword:GetChildren()) do a = v:Clone() b = v:Clone() a.Parent = StarterGear b.Parent = Backpack end end end)
Hope this helped :) |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 27 Jan 2015 05:57 PM |
If the place is a group place, then doing:
if player.userId == game.CreatorId then
Is a bad idea, because game.CreatorId will be the ID of the group, and it's possible that there could be a user who has that userId exactly. |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Jan 2015 10:51 PM |
I found out thanks to seranok. I just needed the rocket launcher to be changed. It's just a simple sword fighting game I made. |
|
|
| Report Abuse |
|
|