Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

One Way Teleporting Brick Help?

Asked by 9 years ago

I am a new scripter and a problem has arisen in my project. I am trying to make a one way teleporting brick. Could someone teach/help me with this? Sorry for not providing anything to work with.

0
Theres plenty of Free Models for this don't be afraid to use basic ones despite what people say about using them, Free Models are made to be free models for everyone. Heres one it should come with instructions on the inside: http://www.roblox.com/Teleport-Bricks-item?id=8839767 neoG457 315 — 9y

1 answer

Log in to vote
0
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
9 years ago

Seriously, google is your friend.

This is one of the simplest pieces of code you can write. Since this is your first question, I'm giving you a break and upvoting your question.

In the future, please include the code you're working with as well as any Output and/or an explanation of what it is doing incorrectly.

local teleportFrom = workspace.Brick1
local teleportTo = workspace.Brick2

teleportFrom.Touched:connect(function(hit)
    if game.Players:GetPlayerFromCharacter(hit.Parent) then
        hit.Parent.Torso.CFrame = teleportTo.CFrame + Vector3.new(0, 3, 0)
    end
end)
0
He seems inexperienced, maybe add an explanation? Perci1 4988 — 9y
0
Thankyou for the help. I tried this but I get this message in the prompt and it wont work, Workspace.Script:6: 'then' expected near 'hit' zrock1012 0 — 9y
0
Didn't get a notification, strange. Can you copy and paste your code into your question or a pastebin, please? The code I have here should work perfectly. adark 5487 — 9y
Ad

Answer this question