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: help w/ backpack issues

Previous Thread :: Next Thread 
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
24 Jun 2016 10:56 AM
local passId = 440068456
object = game.ServerStorage.Crescendo

function isAuthenticated(player)
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
object:Clone().Parent = plr.Backpack
end
end)
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
24 Jun 2016 10:56 AM
i basically want the player to have crescendo every time he or she spawns, not just when they die
Report Abuse
xDionysius is not online. xDionysius
Joined: 28 Dec 2012
Total Posts: 45
24 Jun 2016 10:58 AM
Make use of the CharacterAdded event of Player. However you can insert them both in Player.Backpack and Player.StarterGear, that should do the trick aswell.
Report Abuse
GraphicsSettings is not online. GraphicsSettings
Joined: 12 Sep 2013
Total Posts: 2883
24 Jun 2016 10:58 AM
Move the Tool to StarterGear:

object:Clone().Parent = plr.StarterGear
Report Abuse
Lem0nzzx is not online. Lem0nzzx
Joined: 08 Feb 2016
Total Posts: 1604
24 Jun 2016 10:59 AM
Insert cresendo or whatever into replicatedstorage, you can not access it through serverstorage, that's different.
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
24 Jun 2016 11:01 AM
literally moved it to ReplicatedStorage and changed it the object:Clone().parent = plr.StarterGear

now it doesnt work at all
Report Abuse
Lem0nzzx is not online. Lem0nzzx
Joined: 08 Feb 2016
Total Posts: 1604
24 Jun 2016 11:02 AM
Why would you put it in startergear bleh put it in Backpack, also change parent to Parent
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
24 Jun 2016 11:03 AM
if i put it in backpack it wont be there when the person dies
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
24 Jun 2016 11:04 AM
works when its Parent = plr.Backpack, but i want it to be there every time the player dies and StarterGear isn't working
Report Abuse
Lem0nzzx is not online. Lem0nzzx
Joined: 08 Feb 2016
Total Posts: 1604
24 Jun 2016 11:04 AM
Well I mean you could always use a characteradded function for when the player dies.
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
24 Jun 2016 11:05 AM
i have no idea what that is
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
24 Jun 2016 11:07 AM
can you help me w/ the added function thing, b/c im having the same issue w/ a health script

local passId = 384073725

function isAuthenticated(player)
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
plr.Character.Humanoid.MaxHealth = plr.Character.Humanoid.MaxHealth + 50
plr.Character.Humanoid.Health = plr.Character.Humanoid.MaxHealth
end
end)

i basically want the player's max health to always be 150, not just the first time he/she joins the server
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
24 Jun 2016 11:08 AM
b1
Report Abuse
Lem0nzzx is not online. Lem0nzzx
Joined: 08 Feb 2016
Total Posts: 1604
24 Jun 2016 11:08 AM
local plr = game.Players.LocalPlayer
local tool = game.ReplicatedStorage["ToolName"]:clone()
tool.Parent = plr.Backpack

Insert this in a localscript, and insert the localscript in starterpack. Then when the player spawns it clones the tool into the backpack. If you want to use a regular script then;


game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local tool = game.ReplicatedStorage["ToolName"]:clone()
tool.Parent = plr.Backpack
end)
end)
Report Abuse
Lem0nzzx is not online. Lem0nzzx
Joined: 08 Feb 2016
Total Posts: 1604
24 Jun 2016 11:10 AM
local passId = 384073725

function isAuthenticated(player)
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
if isAuthenticated(plr) then
plr.Character.Humanoid.MaxHealth = plr.Character.Humanoid.MaxHealth + 50
plr.Character.Humanoid.Health = plr.Character.Humanoid.MaxHealth
end
end)
end)
Report Abuse
Lem0nzzx is not online. Lem0nzzx
Joined: 08 Feb 2016
Total Posts: 1604
24 Jun 2016 11:11 AM
char.Humanoid.MaxHealth = plr.Character.Humanoid.MaxHealth + 50
char.Humanoid.Health = plr.Character.Humanoid.MaxHealth
Report Abuse
sharpblaze2 is not online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
24 Jun 2016 11:20 AM
im done
ive changed this script around 10 times and it still doesnt work


local passId = 440068456
object = game.ReplicatedStorage.Crescendo

function isAuthenticated(player)
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
object:Clone().Parent = plr.Backpack
end)
end)
end
end)
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