Terrain problem

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    A player walk around an infinite procedural smooth terrain
  2. What is the issue?
    I can’t get it to work with R15 nor Rthro only R6
  3. What solutions have you tried so far?
    tried changing the position with Cframe but that didnt do anything
-- This is an example Lua code block
while true do
	for _,player in pairs(game.Players:GetPlayers()) do
		if player.Character then
			local torso = player.Character:FindFirstChild("Torso") 
			if torso then
				checkSurroundings(torso.Position) --Right here i tried (torso.CFrame.Value)
			end --Check sorroundings is a function to generate the terrain
		end
	end
	wait(.2) -- Update every 200 miliseconds
end

Any help please?

R15 characters don’t have a Torso part, try using HumanoidRootPart instead

alright I’ll see what i can do

You are only checking for the Torso on the Character, which only R6 has. R15 and Rthro alike have UpperTorso and LowerTorso. I’d suggest checking HumanoidRootPart instead.

Thanks very much so will it be the HRP’s CFrame or stick with Position?

Thanks a bunch! Do i use it’s CFrame or Position like usual?

Position should be fine unless you need to know which way the character is facing

Like what @Haggie125 said, if you aren’t looking for what direction the character is facing, but want to use the position only, use Vector3s. Although, if you’re looking to generate terrain in the direction the player is looking, you could use a CFrame, although that would add a little more complexity to the script than needed, so I’d use a Vector3.

Thanks @Haggie125 & @zQ86 well I havent looked further in the character’s children but thanks again and have a great day! :wave:t2:

1 Like