I have a mermaid morph and I was wondering how I would go about making it so when you go on land you transform into the human form and water you transform into the mermaid form.
3 Likes
You can get the player’s state.
Humanoid:GetState()
This is how the code should look like:
local runService = game:GetService("RunService")
local hum = script.Parent.Humanoid
runService.RenderStepped:Connect(function()
if hum:GetState() == Enum.HumanoidStateType.Swimming then
print("Player is swimming")
else
print("Player is not swimming")
end
end)
For the morphing part, you need to clone the morph and do this: localPlayer.Character = clonedMorph
, and then you change the PrimaryPart CFrame to the previous character.
1 Like