I was trying to make a teleport tool (server sided)
so basically i use remote function to get the mouse.Target i tried my best but still not working
local Model = (script.Parent:FindFirstAncestorWhichIsA("Player") or script.Parent:FindFirstAncestorWhichIsA("Model"))
local Player = game:GetService("Players"):FindFirstChild(Model.Name)
local Character = Player.Character
local RemoteFunction = script.Parent.rf
local Mouse = nil
function Deb()
Mouse = RemoteFunction:InvokeClient(Player)
Character.PrimaryPart:moveTo(Mouse)
end
script.Parent.Equipped:Connect(function()
script.Parent.Activated:Connect(function()
Deb()
end)
end)
You’ve typed the method incorrectly it should be ‘MoveTo’, you’ve also used it incorrectly, it should be called through/on a model instance not a part instance.