|
| 28 Feb 2015 03:23 PM |
Whats the problem with this script? (Ignore the first "Namer's" typo. In the script it looks correct, act like the line doesnt cut off and move one more down.)
--[[Namers]]--
local ClickDetector = game.Workspace["Body in Dumpster"].Dumpster.Doors["Door(Open)"].ClickDetector local Door = script.Parent local bP = Instance.new("BodyPosition") local bV = Instance.new("BodyVelocity")
--[[Functions]]--
function OpenDoor(playerWhoClicked) bP.Rotation = Vector3.new(0, 0, -9) bP.Position = Vector3.new(42.335, 6, -12.16) bP.Parent = Door end
function CloseDoor() bP.Rotation = Vector3.new(0, 0, 15) bP.Position = Vector3.new(42.335, 4.728, -12.16) bP.Parent = Door end
--[[Script]]--
if ClickDetector.onMouseClick:connect() then OpenDoor() wait(5) CloseDoor() end |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:28 PM |
| Also, it says theres no Script Error! I so confuse! |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:30 PM |
function OpenDoor(playerWhoClicked) bP.Rotation = Vector3.new(0, 0, -9)
You need to connect that with the player. You don't get a error cause its correct but it does not effect the player because the code for player is missing.
------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊ |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:33 PM |
| I tried removing the playerWhoClicked but it still isnt working! |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:38 PM |
ClickDetector.onMouseClick:connect(OpenDoor) CloseDoor() try those should work
------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊ |
|
|
| Report Abuse |
|
|
Razurix
|
  |
| Joined: 30 Sep 2011 |
| Total Posts: 5376 |
|
|
| 28 Feb 2015 03:40 PM |
Try putting in prints and tell us where it stops.
Shut your pie hole |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:40 PM |
Nope. Now it looks like this and still dont work!!!
--[[Namers]]--
local ClickDetector = game.Workspace["Body in Dumpster"].Dumpster.Doors["Door(Open)"].ClickDetector local Door = script.Parent local bP = Instance.new("bodyPosition") local bV = Instance.new("bodyVelocity")
--[[Functions]]--
function OpenDoor() Door.Anchored = false wait(2) bP.Rotation = Vector3.new(0, 0, -9) bP.Position = Vector3.new(42.335, 6, -12.16) bP.Parent = Door end
function CloseDoor() bP.Rotation = Vector3.new(0, 0, 15) bP.Position = Vector3.new(42.335, 4.728, -12.16) bP.Parent = Door wait(2) Door.Anchored = true end
--[[Script]]--
if ClickDetector.onMouseClick:connect(OpenDoor) then CloseDoor() end |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:41 PM |
if ClickDetector.onMouseClick:connect(OpenDoor) then wait(5) CloseDoor() end ------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊ |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:42 PM |
Not onMouseClick it's MouseClick:connect(OpenDoor)
------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊ |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Feb 2015 03:46 PM |
local ClickDetector1 = game.Workspace["Body in Dumpster"].Dumpster.Doors["Door(Open)"].ClickDetector
Try that just to check.
------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊ |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:49 PM |
| When I do ClickDetector1 my thing at the bottom says unrecognized global 'ClickDetector' so I add a 1 and it says it works, so the 'Namer' works, but the script dont... |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:52 PM |
Did you try
game.Workspace["Body in Dumpster"].Dumpster.Doors["Door(Open)"].ClickDetector.MouseClick:connect(OpenDoor)
------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊ |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Feb 2015 03:59 PM |
Maybe the functions is the problem I can't see any other way this is not working :/
------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊ |
|
|
| Report Abuse |
|
|
tommy1997
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 18 |
|
|
| 28 Feb 2015 04:09 PM |
clickDetector.MouseClick:connect(function() OpenDoor() wait(5) CloseDoor() end) |
|
|
| Report Abuse |
|
|
tommy1997
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 18 |
|
|
| 28 Feb 2015 04:15 PM |
clickDetector.MouseClick:connect(function(player) OpenDoor(player) wait(5) CloseDoor(player) end) |
|
|
| Report Abuse |
|
|