-
What do you want to achieve?: I am trying to create a script that causes continuous water. By this I mean a part that exists everywhere, or seems to exist everywhere, in the map.
-
What is the issue?: I attempted to create this system using a LocalScript, using the RenderStepped event to move the part to the players current location on the X, Z coordinates, but on the same Y coordinate every single frame. I assumed this would work, and it does, but the effect is jarring. When I walk, it does not appear that I am moving, even though I am, because the part is moving relative to me. I want to know how to create a part that appears wherever I am on the map.
-
What solutions have you tried so far?: As mentioned earlier, I moved the part relative to the player on the X and Z axes, but not the Y axis. It appears everywhere, but the effect is jarring due to it being relative to the player, and it appears I am not moving.
My script attempting to solve the problem:
local RunService = game:GetService("RunService")
local Player = game.Players.LocalPlayer
local Character = Player.Character
if not Character or not Character.Parent then
Character = Player.CharacterAdded:wait()
end
local PartDimensions = Vector3.new(2048,1,2048)
local WaterPart = Instance.new("Part")
WaterPart.Size = PartDimensions
WaterPart.CFrame = CFrame.new(Character.HumanoidRootPart.Position.X,0,Character.HumanoidRootPart.Position.Z)
WaterPart.Material = Enum.Material.Foil
WaterPart.CanCollide = false
WaterPart.Parent = game.Workspace
Character.Humanoid.Died:Connect(function()
WaterPart:Destroy()
end)
RunService.RenderStepped:Connect(function(step)
WaterPart.CFrame = CFrame.new(Character.HumanoidRootPart.Position.X,0,Character.HumanoidRootPart.Position.Z)
end)
What the jarring effect looks like:
Effect I am looking for (from Tradelands):
A game that has similar mechanics to what I am describing here is the game Tradelands: Tradelands - Roblox
Thank you for reading – I hope someone has a solution in mind for my water effect.