For these examples, replace 'Obj' with your object
In a localscript you could do:
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character ~= nil
local character = plr.Character
local function Teleport(o)
character.Torso.CFrame = CFrame.new(o)
end
Teleport(Obj) --You could call this after an event too.
In a ServerScript:
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local torso = char:WaitForChild("Torso")
torso.CFrame = CFrame.new(game.Workspace.Obj.Position)
end)
end)
Or in like a brick or something:
script.Parent.Touched:connect(function(hit)
if (hit.Parent:FindFirstChild("Humanoid")) then
hit.Parent.Torso.CFrame = CFrame.new(game.Workspace.Obj.Position)
end
end)
If money grew on trees... It would be as valuable as leaves. | Twitter: @TwisterRBLX
|