Basically, I'm trying to make a FE gui that whenever you type the person's name in the first textbox and the position in the second textbox, it moves the player's name in the first textbox to the position from the second textbox. For some reason, it keeps saying Character is not a valid member of Model in the output. Help?
Both of my scripts (if needed local script):
--SERVER SCRIPT--
local RS = game:GetService("ReplicatedStorage")
local twigger = RS.OwnerRemotes:WaitForChild("PosFrame")
twigger.OnServerEvent:Connect(function(plr, plrname, pos)
game.Workspace:WaitForChild(plrname).Character.HumanoidRootPart.CFrame = pos.CFrame * CFrame.new(0,3,0) -- The problem/error, sorry if lines 5-6 are messed up, they're in the same line, like this green text thingy! :D
end)
--LOCAL SCRIPT--
local RS = game:GetService("ReplicatedStorage")
local remotea = RS.OwnerRemotes:WaitForChild("PosFrame")
script.Parent.CB.MouseButton1Click:Connect(function()
local yeeter = script.Parent.posBox.Text
local yeet = script.Parent.userBox.Text
remotea:FireServer(yeet, yeeter)
end)
