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: How would i alter this script?

Previous Thread :: Next Thread 
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
14 Oct 2016 08:29 PM
I want to alter the following teleporter script so that I can only the job in the leaderboard called "Pizza Chef" can use it?
(I already have the StringValue in the leaderboard for job, and i already have it set up for pizza chef.)

------------------------------------
modelname="teleporter1a"
------------------------------------

function onTouched(part)
if part.Parent ~= nil then
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
local teleportfrom=script.Parent.Enabled.Value
if teleportfrom~=0 then
if h==humanoid then
return
end
local teleportto=script.Parent.Parent:findFirstChild(modelname)
if teleportto~=nil then
local torso = h.Parent.Torso
local location = {teleportto.Position}
local i = 1

local x = location[i].x
local y = location[i].y
local z = location[i].z

x = x + math.random(-1, 1)
z = z + math.random(-1, 1)
y = y + math.random(2, 3)

local cf = torso.CFrame
local lx = 0
local ly = y
local lz = 0

script.Parent.Enabled.Value=0
teleportto.Enabled.Value=0
torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz))
wait(3)
script.Parent.Enabled.Value=1
teleportto.Enabled.Value=1
else
print("Could not find teleporter!")
end
end
end
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
diefie1245 is not online. diefie1245
Joined: 17 Feb 2013
Total Posts: 36
15 Oct 2016 03:20 AM
I'm an expert in ROBLOX scripting. After "if h~=nil then" you could say
"if game.Players:GetPlayerFromCharacter(h.Parent).Team=="PizzaChef" then"

First of all, "game.Players:GetPlayerFromCharacter(h.Parent)" is a function where you can get the player from the character, so it directs towards the actual player that's touching the brick. In the player, there's a property called team, which is the team the player is currently in. So if you check if the team is "PizzaChef" or whatever the exact name of the Pizza Chef team is, you can make sure that the teleporting will only happen for the Pizza Chef.

By the way, after seeing your script, it doesn't look like you have much knowledge in scripting and you're just going off the basics. There are quicker ways to do this.
Report Abuse
Sarcasmed is not online. Sarcasmed
Joined: 17 May 2013
Total Posts: 15201
15 Oct 2016 03:43 AM
@Delfie, i am Processional Developer and i can say thay it's free model script.
Report Abuse
Sarcasmed is not online. Sarcasmed
Joined: 17 May 2013
Total Posts: 15201
15 Oct 2016 03:45 AM
Diefie*, Professional*

Autocorrect... ;-;
Report Abuse
diefie1245 is not online. diefie1245
Joined: 17 Feb 2013
Total Posts: 36
15 Oct 2016 05:48 PM
Yea, I kinda knew that already. I can tell he doesn't know what he's doing and he didn't write the script himself. The problem that he's having would be second hand to a ROBLOX developer who has, I don't know... ANY experience at all. Also, I looked on his profile and he said he was "working on this big project". I can tell that's a lie. When I first started scripting, I barely knew how to make games but I always talked about "Big Projects", it's just something that kids do.
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 12:00 PM
I wasn't planning on using that script anyways. I was just seeing how much people know in this forum. I AM working on a big project, yet this isn't part of it.

Diefie, stop talking like you're such a top-notch developer. The game on your profile is literally called "ThingGame", is made up of 100% free models, and shows that you can't build to save your life.

And you, Sarcasmed.
If you were a professional developer, you wouldn't be scripting on ROBLOX.

How about you shut up until you know what you're talking about, both of you, and stop with the dry insults. It'll do us all a favor.
Report Abuse
Scriptos is not online. Scriptos
Joined: 17 Jun 2008
Total Posts: 2900
16 Oct 2016 12:03 PM
Well,

"And you, Sarcasmed.
If you were a professional developer, you wouldn't be scripting on ROBLOX. "

I beg to differ. I'm in college and am majoring in computer science. Scripting on ROBLOX is just fun.
Report Abuse
Sarcasmed is not online. Sarcasmed
Joined: 17 May 2013
Total Posts: 15201
16 Oct 2016 12:04 PM
Professional ROBLOX Developer, idiot.

And let me tell you a secret, you or your game will not get famous anytime soon or possibly never, so stop acting like you have 'big projects'

Diefie, dude please, get your ego down a bit.
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 01:00 PM
I am working on a big project.
Idk if don't get famous, i like making games.
You also seem like a short-tempered, terrible-attituded person.
I'd also like to know your definition of "Professional Roblox Developer", because you can't have a profession in ROBLOX developing unless your games are currently popular (and yours aren't) and you have obi (which you don't).
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 01:01 PM
And good for you, scriptos. Get yourself a good job with that computer science major.
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 01:02 PM
Also, thanks for the help diefie. I could use that function in some part of my game, if it's ok with you.
Report Abuse
Sarcasmed is not online. Sarcasmed
Joined: 17 May 2013
Total Posts: 15201
16 Oct 2016 01:11 PM
I have a group, moron.

https://www.roblox.com/My/Groups.aspx?gid=2775063

I earned there for 2 months more than you ever will.

You seem like unsure person, because you tempt to fight on virtual forum.
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 01:13 PM
Just because you own a group doesn't mean you're a professional.
Report Abuse
Sarcasmed is not online. Sarcasmed
Joined: 17 May 2013
Total Posts: 15201
16 Oct 2016 01:26 PM
Oh you're not smart either. How cute is that.
Report Abuse
Ocks67 is not online. Ocks67
Joined: 07 Mar 2009
Total Posts: 7218
16 Oct 2016 01:41 PM
Using mouthwash as an eyedrop medicine is not a great idea.
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 01:46 PM
Sarcasmed, I own a dog. Does that make me a professional pet caretaker?
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 01:47 PM
And ocks, I'll use that advice wisely.
Report Abuse
Ocks67 is not online. Ocks67
Joined: 07 Mar 2009
Total Posts: 7218
16 Oct 2016 01:50 PM
Pepsodent isn't as good as Aquapel if you desire to wipe more effectively.
Report Abuse
Sarcasmed is not online. Sarcasmed
Joined: 17 May 2013
Total Posts: 15201
16 Oct 2016 01:51 PM
Owning group doesn't but powering group games and profiting from them makes me, also my 4 year Developing experience.
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 01:59 PM
Earning a fake virtual currency doesn't give you a profit. And having experience doesn't make you professional.
Report Abuse
Sarcasmed is not online. Sarcasmed
Joined: 17 May 2013
Total Posts: 15201
16 Oct 2016 02:04 PM
O, but it does.

And did you ever hear of Developer Exchange aka DevEx? I didn't think so.
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 02:17 PM
I addressed that issue earlier.
And you can't use DevEx, you're not obc.
Report Abuse
hokaijokailakamonza is not online. hokaijokailakamonza
Joined: 25 Apr 2014
Total Posts: 643
16 Oct 2016 02:18 PM
I'm also done posting on this thread, it's annoying.
Report Abuse
Ocks67 is not online. Ocks67
Joined: 07 Mar 2009
Total Posts: 7218
16 Oct 2016 02:20 PM
This thread has turned into a cat fight.
Report Abuse
Sarcasmed is not online. Sarcasmed
Joined: 17 May 2013
Total Posts: 15201
16 Oct 2016 02:33 PM
I buy OBC when i have to DevEx, can you get any dumber ?

I won't be replying anymore, go get a life.
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