#how to make a water splash effect
1 messages · Page 1 of 1 (latest)
how are u gonna know when something is gonna touch the water?
terrain water?
no
Its a normal part that looks like water
Only sound effect works too if its easier
Alright
local water = script.Parent
local debounce = {}
water.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end
local humanoid = character:FindFirstChild("Humanoid")
local root = character:FindFirstChild("HumanoidRootPart")
if not humanoid or not root then return end
if root.AssemblyLinearVelocity.Y < -5 then
if debounce[character] then return end
debounce[character] = true
print("Player hit water surface")
-- do the sound/vfx here
task.delay(1, function()
debounce[character] = nil
end)
end
end)
something like this i suppose
Thanks
np
if you want a system that works longterm
i recommend getting a footstep module and then you can just go in the code and change one of the material sounds to water and it can work from there
you can find alot of footstep modules on youtube
@loud hamlet
alright
** You are now Level 1! **