of     2   
chevron_rightchevron_rightchevron_right

RealistK
#138478635Saturday, June 28, 2014 8:10 AM GMT

I am learning to script, and editing my RPG game but I have took a morph from free models, and when I be that morph, I can't buy any of my swords from the shop etc. Can someone tell me how to make this script so I can actually buy things when I am in the morph? This script is too advanced for me, if you also can tell me what you changed it would be amazing. function getObject(className, part) if part.className ~= className then repeat part = part.Parent until part.className == className end return part end -- Index variables goku = game.Lighting.Goku:Clone() -- You need the model, named "Goku", to be in game.Lighting player = getObject("Player", script) -- Find the player function doMorph(model) -- Named it doMorph, since I feel that's more of what it's doing model.Torso.Anchored = true hint = Instance.new("Hint", player) for i=1,3 do hint.Text = "Morphing, please wait" for c=1,5 do hint.Text = hint.Text, "." wait(0.03) end end hint.Parent = nil model.Torso.Anchored = false end function morph() repeat -- Make sure the player didn't die if player.Character == nil then return nil end -- Now make sure player isn't already morphed if player.Character:FindFirstChild("IsaDalek") then return false -- I changed it, so it can show the error end -- Index new variables newModel = goku:Clone() -- Clone the Goku model parts = newModel:GetChildren() -- Get each of the parts -- Unanchor each part, and make it collide with other parts for i=1,#parts do if parts[i].className == "Part" then parts[i].Anchored = false parts[i].CanCollide = true end end -- Make the new model, and enable it to be the character newModel.Parent = workspace newModel:MakeJoints() newModel.Name = "Goku ("..player.Name..")" newModel.Controller = 7 -- Since this doesn't have the model itself, I'm unsure whether this is there. However, -- it was in the previous script, so I'm including it. until newModel.Humanoid.Health ~= 0 -- Don't clone if it died player.Character = newModel -- Change the character doMorph(newModel) -- Show the morphing hint end script.Parent.MouseButton1Down:connect(morph)
RealistK
#138480421Saturday, June 28, 2014 8:46 AM GMT

bump
FlamesOfHatred
#138482668Saturday, June 28, 2014 9:37 AM GMT

The problem is not in the morph script its on the touch script because the brick with touch script touches the morph not the player
FlamesOfHatred
#138483324Saturday, June 28, 2014 9:53 AM GMT

Do you use a touch script that puts gui shop on the player? I made this one: gui=LOCATION:Clone() <-- Location of the gui function Touche(part) --if player has morph-- if part.Parent:IsA("Model") then h=part.Parent.Parent:FindFirstChild("Humanoid") if h~=nil then player=game.Players:GetPlayerFromCharacter(part.Parent.Parent) gui.Parent=player.PlayerGui --If player has no morph--- else if part.Parent:IsA("Model") then h=part.Parent:FindFirstChild("Humanoid") if h~=nil then player=game.Players:GetPlayerFromCharacter(part.Parent) gui.Parent=player.PlayerGui end end end end end script.Parent.Touched:connect(Touche)
FlamesOfHatred
#138483466Saturday, June 28, 2014 9:56 AM GMT

Sorry, I fixed it: gui=LOCATION:Clone() function Touche(part) if part.Parent:IsA("Model") then h=part.Parent.Parent:FindFirstChild("Humanoid") if h~=nil then player=game.Players:GetPlayerFromCharacter(part.Parent.Parent) gui.Parent=player.PlayerGui else if part.Parent:IsA("Model") then h=part.Parent:FindFirstChild("Humanoid") if h~=nil then player=game.Players:GetPlayerFromCharacter(part.Parent) gui.Parent=player.PlayerGui end end end end end script.Parent.Touched:connect(Touche)
RealistK
#138484436Saturday, June 28, 2014 10:19 AM GMT

It doesn't put a shop GUI in the player, I don't really know what you mean with that but it just makes you the same person as the morph, so I think the leaderboard is not attached to you anymore or something. I made the entire morph thing a model, would you maybe check it out and tell me what you changed?
FlamesOfHatred
#138485183Saturday, June 28, 2014 10:37 AM GMT

put the script i made in a part then change the "LOCATION" to the location of the GUI -_-
RealistK
#138487789Saturday, June 28, 2014 11:37 AM GMT

I get it but like I said, you just be the morph, you won't get a GUI in your screen.
FlamesOfHatred
#138488621Saturday, June 28, 2014 11:56 AM GMT

wiki.roblox.com/index.php?title=Scripting googledrive.com/host/0BygQW0Uq8-q0eFY0UWpfbmJqR3M/index.html
RealistK
#138488846Saturday, June 28, 2014 12:01 PM GMT

Can you just tell me what I should do step by step.. I'm not a born scripter and I am trying to understand it but I you are confusing me with the GUI thing.
FlamesOfHatred
#138489434Saturday, June 28, 2014 12:14 PM GMT

thats why learn how to script.. make a gui put it on lighting make a frame put in the gui make a part anchored it put the script in the part change the "Location" in the script to gui's location game.Lighting.gui get a free model morph wear it or just touch it dont get free model morphs k.done
RealistK
#138490365Saturday, June 28, 2014 12:33 PM GMT

...? I don't need a gui or anything, what is it supposed to do? Just want it so if you step on the button, you will be that morph but you can still buy things.
FlamesOfHatred
#138500538Saturday, June 28, 2014 3:13 PM GMT

i was asking a question if you use shop gui -_- T he morph script got no problem its the touch script Know the basic instances and parts Go: wiki.roblox.com/index.php?title=Scripting learn the basics -_-
FlamesOfHatred
#138500618Saturday, June 28, 2014 3:14 PM GMT

TheBoyOnTheBlock
#138500687Saturday, June 28, 2014 3:15 PM GMT

Don't use free models. Use magnitude. TADA!
FlamesOfHatred
#138500853Saturday, June 28, 2014 3:17 PM GMT

^He's right,you know..
FlamesOfHatred
#138500854Saturday, June 28, 2014 3:17 PM GMT

^He's right,you know..
RealistK
#138501256Saturday, June 28, 2014 3:22 PM GMT

Do you mean the touch script of the things you can buy or the morph touch script? If you mean the morph touch script then that one is in the model you took. What can I change in that script?
RealistK
#138513716Saturday, June 28, 2014 5:26 PM GMT

?
RealistK
#138522311Saturday, June 28, 2014 6:49 PM GMT

bump
warspyking
#138522879Saturday, June 28, 2014 6:54 PM GMT

This is why he couldn't help you. You are not listening -_- Exactly what is the shop? A building? A GUI? A bunch of buttons? How is the shop giving them items? Through touch? Through physical button clicking? Through gui button clicking?
RealistK
#138523698Saturday, June 28, 2014 7:02 PM GMT

Oh he was talking about a morph > shop or something I didn't understand it. But no, the game: http://www.roblox.com/The-Assassins-Code-RPG-place?id=140680077 you might want to check it out to be sure. If you have enough gold, you can go to the shop and step on the brick in front of the weapon displayed and just get it, no GUI, nothing. Wearing a morph, if you step on the button to get the weapon then just nothing happens.
FlamesOfHatred
#138569658Sunday, June 29, 2014 2:06 AM GMT

Know the basic instances,seriously.. We can't help you if you don't know the basic instances We can't help you if you don't know what is GUI and I already said the problem is not in the morph script its on the touch script -_-
RealistK
#138599669Sunday, June 29, 2014 7:57 AM GMT

.. Ofc I know what a GUI is and for the 3rd time, the touch script is also in the model which you took, so you can help me.
FlamesOfHatred
#138622829Sunday, June 29, 2014 2:58 PM GMT

AND FOR THE 2ND TIME I SAID MAKE A PART and put the script on that part

    of     2   
chevron_rightchevron_rightchevron_right