Thursday, June 9, 2011

Daily Scripting Help 6/9/11

Dear BCG,
I was editing a dialog shop when I discovered when you buy it and it goes to backpack it goes away when you die. When it goes to starter pack you don't get it right away. how do you make it so it goes both to starterpack and backpack?

-forgotoldacount

Dear forgotoldacount,
It's very simple! Parent it to both the 'Backpack' and the Player's 'StarterGear'! :D
Here:


local tool = game.Lighting.Sword2
script.Parent.DialogChoiceSelected:connect(function(player,msg)
if msg == "InputSt00fHere" then
tool:clone().Parent = player.Backpack
tool:clone().Parent = player.StarterGear
end
end)


You will need to edit the msg, and the player value in the function of course!

No comments:

Post a Comment

Write your comment here... OR Flingi will eat you