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 » Game Design
Home Search
 

Re: I Need help making an open door gui

Previous Thread :: Next Thread 
zoephixical is not online. zoephixical
Joined: 04 Nov 2011
Total Posts: 2555
15 Oct 2017 05:05 AM
I can't seem to figure out how to create a gui so when you come close to the door it shows a gui saying "press e to open" door and then you can press e and the door will open.


*drops microphone
Report Abuse
jhammer41 is not online. jhammer41
Joined: 24 Jul 2011
Total Posts: 17
15 Oct 2017 05:09 AM
I know how to do it (Maybe it works)

I have created a script and put it in the Player Starter Pack.

SCRIPT:
Player = script.Parent.Parent
mouse = Player:GetMouse()

function onKeyDown(key)
key = key:lower()

if key == "e" then
Report Abuse
ZombiDev is not online. ZombiDev
Joined: 20 Aug 2016
Total Posts: 2106
15 Oct 2017 05:14 AM
please dont make an oder game but ^
Report Abuse
zoephixical is not online. zoephixical
Joined: 04 Nov 2011
Total Posts: 2555
15 Oct 2017 05:15 AM
yea its not for an oder game


*drops microphone
Report Abuse
ZombiDev is not online. ZombiDev
Joined: 20 Aug 2016
Total Posts: 2106
15 Oct 2017 05:18 AM
I didn't mean to post that on this thread, sorry.


Zombi#0706 | Lua & C# Developer | Web Developer | Graphics Artist |
Report Abuse
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
15 Oct 2017 05:24 AM
Assuming you know how to script

Add an objectvalue inside player somewhere

add a local script that changes the object inside objectvalue's value, CanCollide to false everytime player pressed E


make an invisible part slightly bigger than the door, put it in the same position as the door.

when touched, add the gui into player's gui folder and changes objectvalue's value that i mention earlier into the door.

and then when untouched remove the gui and change the value of objectvalue to nil.

Don't forget a debounce so that multiple guis won't show up.

Report Abuse
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
15 Oct 2017 05:25 AM
Forget to mention the Touched and TouchEnded script should be made inside the invisible part
Report Abuse
jhammer41 is not online. jhammer41
Joined: 24 Jul 2011
Total Posts: 17
15 Oct 2017 06:57 AM
Ok.
Report Abuse
IIKinqPali is not online. IIKinqPali
Joined: 27 Jan 2014
Total Posts: 11
15 Oct 2017 10:25 AM
local Wood = true

local parent = script.Parent

local function on()
Wood = true
parent.Transparency = 0
parent.CanCollide = true
end

local function off()
Wood = false
parent.Transparency = 0.8
parent.CanCollide = false
end

local function OnClicked()
if Wood == true then off() else on() end

end
parent.ClickDetector.MouseClick:connect(OnClicked)

on()
Report Abuse
K7Q is not online. K7Q
Joined: 23 Mar 2013
Total Posts: 5546
15 Oct 2017 10:27 AM
dont listen to any of these trash scripters, its obvious they just recently learned to script so they make these sub par transparency type scripts and its cringy and bad
Report Abuse
jhammer41 is not online. jhammer41
Joined: 24 Jul 2011
Total Posts: 17
15 Oct 2017 07:41 PM
am I one of those
Report Abuse
K7Q is not online. K7Q
Joined: 23 Mar 2013
Total Posts: 5546
15 Oct 2017 08:25 PM
yes
Report Abuse
ZombiDev is not online. ZombiDev
Joined: 20 Aug 2016
Total Posts: 2106
15 Oct 2017 08:31 PM
@K7Q i bet you use alvinblox tutorials lmao
Report Abuse
K7Q is not online. K7Q
Joined: 23 Mar 2013
Total Posts: 5546
15 Oct 2017 09:50 PM
@zombi

funny when you probably starting coding a year ago and you joined last year, serious loser you are lool.
Report Abuse
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
16 Oct 2017 02:49 AM
@K7Q Tell is your solution to his problem then, senior scripter.
Report Abuse
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
16 Oct 2017 02:50 AM
Us
Report Abuse
K7Q is not online. K7Q
Joined: 23 Mar 2013
Total Posts: 5546
16 Oct 2017 12:21 PM
use magnitude to get the distance from the player, if the player is close enough then clone a screengui into playergui and the playergui would have a script that would open the door if 'e' was pressed.


@OP is this door only opened by one player or multiple?
Report Abuse
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
16 Oct 2017 05:47 PM
Won't that cause lag, assuming there is a lot of door, and will it cause problem in this scenario:

The player is in the first floor of the building,
And the door is on second floor.

Won't the player be able to open the door on the second floor?
Report Abuse
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
16 Oct 2017 05:50 PM
Wow, I just realized how terrible the grammar I used there, sorry if it burn your eyes.
Report Abuse
K7Q is not online. K7Q
Joined: 23 Mar 2013
Total Posts: 5546
16 Oct 2017 06:39 PM
there is no thing around it then unless you would rather have like an invisible block and then and just used debounce to prevent it from spazzing out, senior scripter.
Report Abuse
ZombiDev is not online. ZombiDev
Joined: 20 Aug 2016
Total Posts: 2106
16 Oct 2017 06:46 PM
@K7Q

I've been scripting for 6 years and I know 6 different languages while you probably struggle in simple lua
Report Abuse
ZombiDev is not online. ZombiDev
Joined: 20 Aug 2016
Total Posts: 2106
16 Oct 2017 06:51 PM
^ I know more if you count stuff like SQL.
Report Abuse
K7Q is not online. K7Q
Joined: 23 Mar 2013
Total Posts: 5546
16 Oct 2017 07:04 PM
oh yes you are pro scripter thats why you have so many failed projects
Report Abuse
MonoBlockZ is online. MonoBlockZ
Joined: 22 Dec 2016
Total Posts: 578
16 Oct 2017 08:20 PM
Well that was my solution

Report Abuse
ZombiDev is not online. ZombiDev
Joined: 20 Aug 2016
Total Posts: 2106
17 Oct 2017 01:09 AM
Everyone has failed projects, if you’ve never had a failed project that means you are a horrible scripter and will never learn any new languages.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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