generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Dumpster Lid Open problem

Previous Thread :: Next Thread 
spicyzombiekiller is not online. spicyzombiekiller
Joined: 10 Mar 2011
Total Posts: 77
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
spicyzombiekiller is not online. spicyzombiekiller
Joined: 10 Mar 2011
Total Posts: 77
28 Feb 2015 03:28 PM
Also, it says theres no Script Error! I so confuse!
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
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
spicyzombiekiller is not online. spicyzombiekiller
Joined: 10 Mar 2011
Total Posts: 77
28 Feb 2015 03:33 PM
I tried removing the playerWhoClicked but it still isnt working!
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
28 Feb 2015 03:38 PM
ClickDetector.onMouseClick:connect(OpenDoor)
CloseDoor()
try those
should work

------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊
Report Abuse
Razurix is not online. 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
spicyzombiekiller is not online. spicyzombiekiller
Joined: 10 Mar 2011
Total Posts: 77
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
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
28 Feb 2015 03:41 PM
if ClickDetector.onMouseClick:connect(OpenDoor) then
wait(5)
CloseDoor()
end
------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
28 Feb 2015 03:42 PM
Not onMouseClick it's MouseClick:connect(OpenDoor)

------------------------------------------------------------------------------------------------------------------------------------------------ #Handsomebob10 ☊✪✪☊
Report Abuse
spicyzombiekiller is not online. spicyzombiekiller
Joined: 10 Mar 2011
Total Posts: 77
28 Feb 2015 03:42 PM
Still doesnt ;-;
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
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
spicyzombiekiller is not online. spicyzombiekiller
Joined: 10 Mar 2011
Total Posts: 77
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
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
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
spicyzombiekiller is not online. spicyzombiekiller
Joined: 10 Mar 2011
Total Posts: 77
28 Feb 2015 03:55 PM
Still nope.
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image