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 » Scripting Helpers
Home Search
 

Re: New GUI Help

Previous Thread :: Next Thread 
multrimax is not online. multrimax
Joined: 25 Dec 2009
Total Posts: 10294
12 Nov 2013 06:44 PM
playerTeleport = script.Parent.Parent.Parent.Parent.Parent
part = game.Workspace.LevelOne.LevelTwoAccess

touching = false

function didTouch(part)
if part:IsDescendantOf(game.Players.LocalPlayer.Character) then
touching = true
end
end

part.Touched:connect(didTouch)

function didNotTouch(part)
if part:IsDescendantOf(game.Players.LocalPlayer.Character) then
touching = false
end
end

part.Touched:connect(didNotTouch)

function Teleport(Hit)
if touching then
playerTeleport.Character.Torso.CFrame = CFrame.new(109, 5.5, 12)
end
end

script.Parent.MouseButton1Down:connect(Teleport)

Any reason why this script won't work?
Report Abuse
C0D3Y is not online. C0D3Y
Joined: 24 Jul 2010
Total Posts: 1692
12 Nov 2013 06:50 PM
Is there any output?
Report Abuse
multrimax is not online. multrimax
Joined: 25 Dec 2009
Total Posts: 10294
12 Nov 2013 06:59 PM
What it does is that when a player touches a brick, they are allowed to click a TextButton they weren't allowed to click before. It works, but when the player dies, they have to touch the brick again, but I don't want that to happen. Nothing comes out the output.
Report Abuse
C0D3Y is not online. C0D3Y
Joined: 24 Jul 2010
Total Posts: 1692
12 Nov 2013 07:01 PM
Ah, okay. Well there's two ways you can go about this:

1. Make a value inside each player and check to see if it's true whenever they die. You'd change this value to true once they clicked the button

2. Make a table that contains a list of players that have clicked the button and check the table for the player's name every time they die.
Report Abuse
multrimax is not online. multrimax
Joined: 25 Dec 2009
Total Posts: 10294
12 Nov 2013 07:04 PM
And how would I do the first one? Sorry, I'm fairly new to scripting.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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