this is the script inside a textbox:
script.Parent.MouseButton1Click:Connect(function()
if game.Players.LocalPlayer.Name == "sussy_bacoo" then
local player = game.Players.LocalPlayer
local pos = player.Character.Torso.Position
local textBox = script.Parent.Parent.TextBox
local text = textBox.Text
local event = game.ReplicatedStorage.Bring
event:FireServer(text, pos)
print(pos)
end
end)
and this is the script inside the part:
local event = game.ReplicatedStorage.Bring
event.OnServerEvent:Connect(function(plr,name,pos)
if script.Parent.Plr.Value == name or name == "all" then
script.Parent.Position = script.Parent.Vector3.new(pos)
script.Parent.Anchored = true
end
end)