You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want the player’s humanoid root part to teleport to a location -
What is the issue? Include screenshots / videos if possible!
The humanoid root part’s isn’t changing -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I googled some stuff and they didn’t work.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
--//VARIABLES\\--
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Assets = ReplicatedStorage.Assets
local Debris = game:GetService("Debris")
local Animations = Assets.Animations
local Events = Assets.Events
--//FUNCTIONS\\--
function Destroy(object : Instance)
Debris:AddItem(object, 0)
end
-- basically some random guy will be teleported to a "place".
-- places in my game are basically maps separated and placed far away from the map.
-- when some stuff happens a random player can be teleported to a place
Events.StartPlaceFunctions.Event:Connect(function(place : Instance, player : Player)
if place.Name == script.Parent.Name then
Events.StartPlaceFunctionsToClient:FireClient(player)
local character = player.Character
local hrp = character:WaitForChild("HumanoidRootPart")
hrp.Anchored = false
print(hrp.Name)
-- character's position didn't change
hrp.Position = script.Parent.SpawnPlace.Position
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
humanoid.WalkSpeed = 16
end
end)