Jump to content

I need a bit of help. (Scripting)


Recommended Posts

Hi everyone! I uh... Don't know how to script. I'm making a game called Easy's (me) Epic Exploration. It's about going through portals to different parts of earth and trying to find a hidden flag. I have no idea how to make teleporters. Bit of help please...? Thanks in advance, and good luck with your games or whatever you make! PS: Not sure if this is scripting or lua or any of that, I really am an amateur. I honestly have no idea what's going on. 

Share this post


Link to post
Share on other sites
  • 2 weeks later...
  • 1 month later...

My basic answer to how to to make a portal is to have a script check for stuff touching the part (Portal). Then, check for a humanoid by doing OtherPart.Parent:FindFirstChild("Humanoid") in an if statement. If there is a Humanoid, change the HumanoidRootPart's position in the Character to the portal's destination. Sorry if you don't understand but you can break down the parts and try to learn how to make it yourself.

Share this post


Link to post
Share on other sites

Basically here is the main code

local TouchPart = script.Parent

local TpPart = path to teleport part

 

TouchPart.Touched:Connect(function(hit)

if hit.Parent:FindFirstChild("Humanoid") then

hit.Parent.HumanoidRootPart.CFrame = TpPart.CFrame

end

end)

Share this post


Link to post
Share on other sites
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.