I have made a terrain generator and I want it so when its under the certain point its water. I have got the base down but how would the part be terrain water? I have it as a part and ive looked for tutorials but as far as I know of theres nothing. If you can just help me that would be appreciated What ive done:
I reccomend you get the part to terrain plugin!
but it has to turn through script
Roblox already added this feature, enable it on Beta Features if is still there!
EDIT: Do you want to convert it into water after the Terrain has been generated?
They only work if your in the beta program.
Where would I do that? Like where do I turn it on?
okay so I cant do that i need to be a part of somthing
no no no not terrian editor again the parts change in script terrain editor wont work
whats it called? an this is to do in script
I think I found it terrain tools convert part to terrain
So you want to convert them to terrain after the terrain has been generated?
If so use: Terrain:FillBlock() for it.
https://developer.roblox.com/en-us/api-reference/function/Terrain/FillBlock
but I still need to enable the beta terrain thing?
To use the code Terrain:FillBlock you don’t need it. Is for scripts, but if you prefer to do it with the Terrain Editor Tool, then enable the feature.
Try usng Terrain:FillBlock()
https://developer.roblox.com/en-us/api-reference/function/Terrain/FillBlock
Here’s a small sample of code
local CFrameToFill = CFrame.new(0, 0, 0)
local WaterSize = Vector3.new(20, 20, 20)
game.Workspace.Terrain:FillBlock(CFrameToFill, WaterSize, Enum.Material.Water)
We also have an article made by Roblox explaining how to use it
https://developer.roblox.com/en-us/articles/Scripting-With-Terrain
Would there be any output error? Show me where you defined ‘part’
What is yPos? Are you sure that the code is running? You did not define a position for the part so it would instance at the game’s origin 0,0,0.