I wanna make a Hie Hie no Mi and Magu Magu no Mi for my game but I don’t really know how to make a water walking passive, not just any regular part water, I mean like terrain water.
Something like this but for terrain water and it won’t spawn the magma if you’re not touching the water.
you need raycast to get the ground terrain, animation events for the magma on where you step
how will animation events detect that?
that’s if you want the magma effects
you can connect an event w/ a script for animation events
I don’t want the player to have an animation while generating the magma below…
Oh, well you don’t need to have one, it’s just the gif you provided does that so I assumed
You mean the walk animation? If you jump and fall it still generates the magma eitherway
How about this? (dont mind the way my player is moving i just did that in my place)
it looks cool but too slow since the player falls to the water sometimes
Solved using lookvector: https://gyazo.com/f64b9d4aa7810af8f7f9b4953e2d0d89
It should create the platform even before you are on the water since it rays like this:
Also I reduced the tween time, you can increase it to whatever you want.
local player = script.Parent
local TS = game:GetService("TweenService")
game:GetService("RunService").RenderStepped:Connect(function()
local hitPart = workspace:Raycast(player:FindFirstChild("HumanoidRootPart").Position, Vector3.new(0, -5, 0) + player:FindFirstChild("HumanoidRootPart").CFrame.LookVector * 5, RaycastParams.new())
if hitPart and hitPart.Material == Enum.Material.Water then
local clone = game.ReplicatedStorage.Part:Clone()
clone.Parent = workspace
clone.Position = hitPart.Position - Vector3.new(0,3,0)
clone.Anchored = true
clone.BrickColor = BrickColor.new("Baby blue")
TS:Create(clone, TweenInfo.new(0.5), {Position = hitPart.Position}):Play()
end
end)
For some reason, it flings me when it generates and when I’m underwater and as soon as my head or a part of my body is above the sun then it’ll generate the platform and then fling me again.
https://gyazo.com/f5166f56a7a7fceade1a622b5fb726f5
What part are you positioning under the player to stand on
a mesh I made
Try adding a cooldown/debounce