Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My teleportation pad just kills me?

Well I haven't scripted in a while and I have no idea why this won't work and trust me going here is my last resort. I get no output and it kills me then the next time I respawn and hit the pad again it does nothing.

debounce = false

script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
	if debounce == true then return end
	debounce = true
	Char = hit.Parent
	Char.Torso.Position = (game.Workspace.tele.Position + CFrame.new(0,5,0))
	m = Instance.new("Message", Workspace)
	m.Text = "Teleported"
	wait(5)
	m:Destroy()
end
end)

1 answer

Lol, this kind of thing happened to me before while using 'Position', try using CFrame, or the ':MoveTo()' method for it;

Char.Torso.CFrame = CFrame.new(game.Workspace.tele.Position + Vector3.new(0, 5, 0))

Hope this helped! (If still having trouble just PM me and I'll take a look)

2 comments

1

No way you're a genius, thanks!

0

Nah, not a genius, just any ordinary scripter. :P

This discussion is preserved as it was. New answers, comments, and votes are closed.