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

I want my Gui button to send someone to a certain part?

So I want this gui button to be clicked then that person who they are arresting will be sent to the part(So far this is making it so when you touch them with the handcuffs its arrest them). script:

script.Parent.Handle.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid")then
		hit.Parent:MoveTo(game.Workspace.HandCuffsLocation.Position)
	end
end)

1 comment

0

MoveTo makes the player walk to the part, not teleport. I suggest using hit.Parent.HumanoidRootPart.CFrame = workspace.HandCuffsLocation.CFrame.

2 answers

local Arresting

wait(2)

Arresting = someone -- this is the arresting player character

local Target = somewhere -- this is the target would player teleport

script.Parent.MouseButton1Click:Connect(function()
	Arresting:SetPrimaryPartCFrame(Target)
end)

4 comments

0

it is useful

0

it is useful

0

Wow that is not good.

0

why u are here

My comment counts as this answer ;)

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