|
| 18 Oct 2012 02:52 PM |
There's a lot I don't know... I'm probably way off. Here's my script:
Approved = {"1cooldude361"}
for i, v in pairs(Approved) do function hit(h) p = game.Workspace:GetChildren() for i= 1, #p do if p.ClassName == "Part" then Instance.new("Message", game.Workspace).Text = h.Parent.Name.." broke this place." p.CFrame = Vector3.new(.9, .9, .9) elseif a = game.Players:GetPlayerFromCharacter(h.Parent) Instance.new("Message", a.Camera).Text = "Go away!" end end end end
script.Parent.Touched:connect(hit)
Yeah, I was pretty close, I just looked at output in the script. What would I say for someone to not be approved? That would be everyone other than me, so... And I'm not sure how to make something only viewable by that person. I just wanted to insert it into a certain player's camera.
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2012 02:57 PM |
Bump.
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2012 03:10 PM |
Help.
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2012 03:22 PM |
| You can only access a players camera through the use of a LocalScript. |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2012 03:27 PM |
You should test if whatever touched the brick is a player before using the script
Also, to access the table of parts in the Workspace, you need to include the index ('p' should be 'p[i]')
And, as Leo said, the script must be Local to access the Player's Camera. |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2012 03:28 PM |
| also, you should put an 'end' where you wrote 'elseif', as it's not needed in this script. |
|
|
| Report Abuse |
|
|