multrimax
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 10294 |
|
|
| 11 May 2013 08:53 PM |
Allowed = {"multrimax", "coolbob44"}
function isAllowed(hit) hum = hit.Parent:FindFirstChild("Humanoid") if hum ~= nil then for i = 1, #Allowed do if Allowed[i].Name == "multrimax" then if Allowed[i].Name == "Coolbob44" then g = game.Workspace:GetChildren() for i = 1, #g do if g[i].ClassName == "Part" then g[i].CFrame = CFrame.fromEulerAnglesXYZ(0.9, 0.9, 0.9) local m = Instance.new("Message") m.Parent = game.Workspace m.Text = plyrname.." broke this place!" wait(4) m:Destroy() end end end else if Allowed[i].Name ~= "multrimax" then if Allowed[i].Name ~= "Coolbob44" then f = hit.Parent:FindFirstChild("Humanoid") f.Health = 0 local a = game.Players:GetPlayerFromCharacter(hit.Parent) local b = Instance.new("Message") b.Parent = a.PlayerGui b.Text = "Go away!" wait(4) end end end end end end
script.Parent.Touched:connect(isAllowed)
Even though I'm on the table, it just displays the "Go away!" text. Any help? |
|
|
| Report Abuse |
|
|
|
| 11 May 2013 09:02 PM |
"if Allowed[i].Name ~= "multrimax" then if Allowed[i].Name ~= "Coolbob44" then "
That makes YOU have the GUI, because it says 'if' and 'then', causing it to only happen for you two. Make it so it's NOT you or coolbob44, and then the script will work. |
|
|
| Report Abuse |
|
|
multrimax
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 10294 |
|
|
| 11 May 2013 09:28 PM |
| Alright, I got that fixed. But now when I touch the brick the 'player.Name.." Broke this place!"' message doesn't appear. any help on that? |
|
|
| Report Abuse |
|
|
multrimax
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 10294 |
|
| |
|
multrimax
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 10294 |
|
| |
|
| |
|
multrimax
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 10294 |
|
|
| 11 May 2013 10:00 PM |
| 23:00:30.597 - Workspace.Part.Script:15: attempt to index global 'player' (a nil value) |
|
|
| Report Abuse |
|
|
multrimax
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 10294 |
|
| |
|
multrimax
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 10294 |
|
| |
|
multrimax
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 10294 |
|
| |
|
multrimax
|
  |
| Joined: 25 Dec 2009 |
| Total Posts: 10294 |
|
| |
|
|
| 12 May 2013 10:57 AM |
Allowed = {"multrimax", "coolbob44"}
function isAllowed(hit) local hum = hit.Parent:FindFirstChild("Humanoid") local name = hit.Parent.Name if hum ~= nil then for i = 1, #Allowed do if Allowed[i].Name == name then local g = game.Workspace:GetChildren() for i = 1, #g do if g[i].ClassName == "Part" then g[i].CFrame = CFrame.fromEulerAnglesXYZ(0.9, 0.9, 0.9) end end local m = Instance.new("Message") m.Parent = game.Workspace m.Text = name.." broke this place!" wait(4) m:Destroy() return end end hum.Health = 0 local a = game.Players:GetPlayerFromCharacter(hit.Parent) local b = Instance.new("Message") b.Parent = a.PlayerGui b.Text = "Go away!" wait(4) end end
script.Parent.Touched:connect(isAllowed) |
|
|
| Report Abuse |
|
|