Help with Support Script

Hello developers, I am trying to accomplish a support script with a teleportation button. However, the teleportation part doesn’t seem to work.

local Player = game.Players.LocalPlayer

	local playerRoot = Player.Character:FindFirstChild('HumanoidRootPart')
	local a = Player
	local b = Player
	local playerRoot = Player.Character:FindFirstChild('HumanoidRootPart')
	local bHumanoid, bHumanoidRootPart = b.Character:FindFirstChildOfClass("Humanoid"), b.Character:FindFirstChild("HumanoidRootPart")
	local TeleportPlayer ="BindableFunction")
	TeleportPlayer.OnInvoke = function()
		bHumanoidRootPart.CFrame = (playerRoot.CFrame*CFrame.Angles(0,math.rad(90/#Player*a),0)**#Player,0,0))*CFrame.Angles(0,math.rad(90),0)
	game.StarterGui:SetCore("SendNotification", {
		Title = "Player Needs Help",
		Text = PlayerNeedingHelp.Name .. " is in need of assistance.",
		Duration = 15,
		Button1 = "Teleport",
				Callback = TeleportPlayer

Could be entirely wrong but I’m pretty sure the callback needs to be a function

1 Like

Needs to be a reference to a ‘BindableFunction’ object which is then invoked when the respective button is clicked/tapped/pressed etc.