Here is the code
--Strings local Playername = game.StarterGui.ScreenGui.Player.Text local Coordinates = game.StarterGui.ScreenGui.Coordinates.Text --Script script.Parent.MouseButton1Click:Connect(function() Playername.HumanoidRootPart.Position = Coordinates end)
Also here is the UI so you get the point https://gyazo.com/439995b389db1a07c1b06a06a01bc333
And this is the error I received when I attempted to test it https://gyazo.com/4bb4174f24bbc8be9c94b203bbc7d509
This is because you’re referencing to the Player Object, instead of the Character, your issue should easily be resolved by writing this in your Mouse Event.
script.Parent.MouseButton1Click:Connect(function() local Character = workspace[Playername] Character:MoveTo(Coordinates).p + Vector3.new(0,3,0) end)
Hope this helps, don’t forget to accept and upvote! Something wrong? Comment!
I understand :MoveTo()
might be new to you, if you’d like to learn more, see this website