I tried making a model with a part named "location", a part named "plate", and a script inside the model. The "plate" has a ClickDetector in it, and I tried putting inside the script this code below to see if, when the plate is clicked, it will set the CFrame of the player's LeftFoot to the CFrame of the "location" part:
local plate = script.Parent.plate local location = script.Parent.location plate.ClickDetector.MouseClick:Connect(function(plr) plr.Parent.Parent.Workspace.plr.LeftFoot.CFrame = location.CFrame end)
I realize that "plr" refers to the player in the "Players", not the "Workspace", and I think that's the problem. I don't know how to fix it, though, so please help me out if you know how to!
Click Detectors return objects, not players. You could try
local plate = script.Parent.plate local location = script.Parent.location plate.ClickDetector.MouseClick:Connect(function(plr) if plr.Parent:FindFirstChild("HumanoidRootPart") then plr.Parent.HumanoidRootPart.CFrame = CFrame.new(location.CFrame + CFrame.new(0,2,0)) end end)
If for some reason this doesn't work, just comment on this and I'll fix it :)