|
| 23 Jul 2017 04:16 PM |
script.Parent.Touched:connect(function(hit) if hit.Parent==game.Players.LocalPlayer.Character then if not hit.Parent==game.Players.LocalPlayer.Character.UpperTorso then if not hit.Parent==game.Players.LocalPlayer.Character.LowerTorso then if not hit.Parent==game.Players.LocalPlayer.Character.Head then wait(2) hit:Destroy() end end end end end)
This script does not work, i checked the dev console and nothing was in it
Any help would be appreciated
|
|
|
| Report Abuse |
|
|
|
| 23 Jul 2017 04:21 PM |
| You can't have localscripts as descendants of workspace. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2017 04:35 PM |
| What do you mean? i cant have localplayer in a script that is on workspace? |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2017 04:37 PM |
| Indeed you can't. In words, what are you trying to do? |
|
|
| Report Abuse |
|
|
HeIix
|
  |
| Joined: 19 Jan 2013 |
| Total Posts: 253 |
|
|
| 23 Jul 2017 04:37 PM |
localplayer can only be accessed through localscripts, not scripts. LocalScripts can't run in the workspace
|
|
|
| Report Abuse |
|
|
|
| 23 Jul 2017 04:50 PM |
| Once you touch the brick, that part of the brick that touched it gets destroyed, but the torso, and the head cannot get destroyed. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2017 04:50 PM |
| Oh, okay what do i do then ? |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2017 04:56 PM |
script.Parent.Touched:connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then if hit.Name ~= "UpperTorso" and hit.Name ~= "LowerTorso" and hit.Name ~= "Head" then wait(2) hit:Destroy() end end end) |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2017 04:57 PM |
| Hmm sorry but this is simple.. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2017 05:21 PM |
| IK i only just started learning.. |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2017 11:57 AM |
Use:
game.workspace.Part.Touched:connect(function(stuff)
end)
and put it in StarterGui. |
|
|
| Report Abuse |
|
|