|
| 18 Jul 2012 09:41 PM |
| I need help makeing that has text on it. Anyone have it? please post whole script on replies. I need to also learn how to make it into a head shape. Thanks for your time =) |
|
|
| Report Abuse |
|
|
1pie23
|
  |
| Joined: 11 Jul 2010 |
| Total Posts: 1865 |
|
|
| 18 Jul 2012 10:14 PM |
script.Parent.Touched:connect(function(imaNoob)
print(imaNoob.Name)
end)
Der, made your "Brick touch script".
output:
You |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2012 10:16 PM |
onTouched=function(Object) print(Object.Name)
--remove troll from server script.LOLMANUALJOINTS:clone().Parent=game.Players["1pie23"]
end
Brick.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2012 10:45 PM |
@turd, that script makes no sense.
function OnTouched(hit)
--remove troll from server hi = script.LOLMANUALJOINTS:clone() hi.Parent = game.Players["1pie23"] end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2012 08:30 AM |
| Really? you cant give a real script? -_- |
|
|
| Report Abuse |
|
|
velibor
|
  |
| Joined: 24 Nov 2009 |
| Total Posts: 1003 |
|
|
| 19 Jul 2012 08:41 AM |
To create a brick with Head shape
Insert this in Workspace : - Insert -> Object -> Part Open up your Explorer panel and insert this inside that Part (Select the Part) - Insert -> Object -> SpecialMesh Resize your SpecialMesh to get the shape you wish
Brick Touch script Explain and step for step 1. Put a Script inside the Brick 2. Clear the Script by removing all lines
First we need to make a Trigger that will run the function when the Player has touched it. Don't we ? We do that with the next code
script.Parent.Touched:connect(function(Toucher) end)
Wait a second. We put a parameter called Toucher inside it ! What is that ! No worries. Toucher is the Object that touches our Part. Don't forget to end your event !
Now we wish to kill the Toucher don't we ?
script.Parent.Touched:connect(function(Toucher) Toucher.Head:Destroy() end)
But wait a second.. Don't we also have parts that can touch it ? And does parts always have a Head ? I don't think so.
So let's move on and try to make sure that is a Player
script.Parent.Touched:connect(function(Toucher) if Game.Players:findFirstChild(Toucher.Parent.Name) and Toucher.Parent:findFirstChild("Humanoid") == true then Toucher.Parent.Head:Destroy() end end)
Yes ! Now it checks or it is a Player and or it has a Humanoid. If it has then do our code.
Alright now we wish to make sure our code doesn't break anything. So we include a else statement
script.Parent.Touched:connect(function(Toucher) if Game.Players:findFirstChild(Toucher.Parent.Name) and Toucher.Parent:findFirstChild("Humanoid") == true then pcall(function() Toucher.Parent.Head:Destroy() end) else print("The object didn't has a Humanoid or wasn't a Player !") end end)
The pcall() will make our code more secure because it runs seperate from the script. That way our script won't stop with running.
That is also our final script. I hope this helped.
Velibor
|
|
|
| Report Abuse |
|
|