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: How do i do this??

Previous Thread :: Next Thread 
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:05 AM
so i want to make a brick and what it does is, whenever you step on it a gui turns visible, and then in a few s e c o n d s it turns invisible, does anybody know how to code that?? i tried it but it doesn't work, i tried everything and it didn't work... im pretty new to coding btw...
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:20 AM
bump
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
20 May 2017 12:21 AM
how do u step on a gui

also u havent tried everything because there r probably multiple solutions
Report Abuse
PraetorianTheGod is not online. PraetorianTheGod
Joined: 02 May 2014
Total Posts: 814
20 May 2017 12:24 AM
script.Parent.Touched:connect(function(part)
if part.Parent:findFirstChild("Humanoid") then
local Char = part.Parent
local Player = game.Players:GetPlayerFromCharacter(Char)
print(Char)
Player.PlayerGui.GUI.Frame.Visible = true
end
end)
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:26 AM
its a brick to be stepped on not gui
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
20 May 2017 12:27 AM
somehow i skimmed over the 'it' my b
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:27 AM
Ok P r a e t o r i a n ill try that...
Report Abuse
GraphicsSettings is not online. GraphicsSettings
Joined: 12 Sep 2013
Total Posts: 2883
20 May 2017 12:29 AM
If you mean a SurfaceGui, just make OnTouched Event and make it Enable/Disable the SurfaceGui using the Script part its parented with.
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:30 AM
what are the chars supposed to be P r a e t o r i a n?? im really sorry for the questions, im new to coding :/
Report Abuse
Ninjaraf6262 is not online. Ninjaraf6262
Joined: 01 Mar 2015
Total Posts: 151
20 May 2017 12:32 AM
Well I haven't tested it but try this. Hope this helps.
just follow my instructions


--PUT THIS IN A LOCALSCRIPT Inside the brick inside the player

brick = game.Workspace. --Complete the path to the brick
Gui = game.Players.LocalPlayer.PlayerGui ---Complete the path to GUI.
time = 10


debounce = true

script.Parent.Touched:connect(function(hit)
if debounce == true then

debounce = false

if hit.Parent.Name == game.Players.LocalPlayer.Name then

Gui.Visible = true

end

end

wait(time)

debounce = true

end)
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
20 May 2017 12:34 AM
'PUT THIS IN A LOCALSCRIPT Inside the brick inside the player'
???
also that code lmao
Report Abuse
PraetorianTheGod is not online. PraetorianTheGod
Joined: 02 May 2014
Total Posts: 814
20 May 2017 12:35 AM
char stands for character
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:35 AM
no i mean like a g u i on the screen graphics...
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:36 AM
lemme try this too ninja r a f..
Report Abuse
PraetorianTheGod is not online. PraetorianTheGod
Joined: 02 May 2014
Total Posts: 814
20 May 2017 12:36 AM
what the hell are you talking about that script will make a Gui visible if you step on a brick
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
20 May 2017 12:36 AM
just put this local script in the gui item u want to hide and show

local part = workspace....... --put part here

local player = game.Players.LocalPlayer

local active = false

part.Touched:connect( function(hit)
if not hit.Parent or not player.Character or active then return end
if hit:IsDescendantOf( player.Character ) then
active = true
script.Parent.Visible = true
wait( period )
script.Parent.Visible = false
active = false
end
end)
Report Abuse
Ninjaraf6262 is not online. Ninjaraf6262
Joined: 01 Mar 2015
Total Posts: 151
20 May 2017 12:39 AM
Just tested it. it worked for me bud.
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
20 May 2017 12:42 AM
but urs doesnt account for if they touch it with anything nor does it make sense to have it in a random part in the character
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:46 AM
W u n d e r yours isn't working ill try ninja's..
Report Abuse
PraetorianTheGod is not online. PraetorianTheGod
Joined: 02 May 2014
Total Posts: 814
20 May 2017 12:47 AM
why do you type like t h i s
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:47 AM
i do that to remove roblox tags :p
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
20 May 2017 12:50 AM
mine works just fine just route it to the part and then change period to whatever time u want
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:52 AM
i did that but it didn't work :/
Report Abuse
PheonixPlayzMC is not online. PheonixPlayzMC
Joined: 18 Jan 2016
Total Posts: 54
20 May 2017 12:56 AM
for everyone who doesn't know what the heck im trying to tell, im basically saying that, i want to make a " s u b # # # l e " kinda thing, so whenever you go infront of a specific door, the transparent button under it will trigger the code to make the g u i aka the text visible then waiting for a few s e c o n d s and then it goes invisible.
Report Abuse
Ninjaraf6262 is not online. Ninjaraf6262
Joined: 01 Mar 2015
Total Posts: 151
20 May 2017 01:05 AM
Oh im sorry man I didn't understand what you were asking. Put this in a brick.
I made this few weeks ago. Just edit the properties or remove some that you don't need
This works perfectly.

function onTouch(hit)

if hit.Parent:FindFirstChild("Humanoid") ~= nil then

if game.Players:FindFirstChild(hit.Parent.Name) ~= nil then
local player = game.Players:FindFirstChild(hit.Parent.Name)

if player:FindFirstChild("PlayerGui"):FindFirstChild("ScreenGui") == nil then
sg = Instance.new("ScreenGui")
sg.Parent = player:FindFirstChild("PlayerGui")
end

if player.PlayerGui.ScreenGui:FindFirstChild("MessageBox") == nil then

local f = Instance.new("Frame")
f.Name = "MessageBox"
f.Position = UDim2.new(0.3, 0, 0.1, 0)
f.Size = UDim2.new(0.4, 0, 0, 50)
f.Style = "RobloxRound"
f.Parent = player.PlayerGui:FindFirstChild("ScreenGui")

local m = Instance.new("TextLabel")
m.Position = UDim2.new##############0##
####FontSize = "Size14"
m.TextColor3 = Color3.new(1,1,1)
m.Parent = f




m.Text = "Insert text here"
wait(3)


m.Text = "Insert more text here"
wait(3.5)


m.Text = "Or even have colored text"
m.TextColor3 = Color3.new(1,0,0)
wait(2)




f:Destroy()
end
end
end
end

script.Parent.Touched:connect(onTouch)
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