Which means it should work, however it isn’t. When I’ve done TeamTest, they don’t get given the model, their character just tps to the middle of nowhere and dies.
The error is occuring in this chunk of code too, as removing this doesn’t tp the player when they enter the water
this wont fix your error but why are you running this every heartbeat instead you can just detect when the humanoid state changes, there is the event here https://developer.roblox.com/en-us/api-reference/ev.
--this is how you use it
humanoid.StateChanged:Connect(function(oldState,newState)
if newState == Enum.HumanoidStateType.Swimming then
--swimming stuff here
end
end
Hmm ok, well I transferred it to the server, but same thing still applies
function TailService:EquipTail(player, newState, character)
local User = PlayerData[player.UserId]
if not User then return end
local Tail = Tails:FindFirstChild(User.Tail)
if newState == Enum.HumanoidStateType.Swimming then
character.LeftFoot.Transparency = 1
character.RightFoot.Transparency = 1
character.RightUpperLeg.Transparency = 1
character.RightLowerLeg.Transparency = 1
character.LeftUpperLeg.Transparency = 1
character.LeftLowerLeg.Transparency = 1
if not character:FindFirstChild('Tail') then
local Clone = Tail:Clone()
Clone.Name = 'Tail'
local Weld = Instance.new('Weld')
Weld.Name = 'Weld'
Weld.Part0 = character.LowerTorso
Weld.Part1 = Clone.PrimaryPart
Weld.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(180), 0, 0)
Weld.C0 = Weld.C0
Weld.Parent = Clone
Clone.Parent = character
end
else
if character:FindFirstChild('Tail') then
character.LeftFoot.Transparency = 0
character.RightFoot.Transparency = 0
character.RightUpperLeg.Transparency = 0
character.RightLowerLeg.Transparency = 0
character.LeftUpperLeg.Transparency = 0
character.LeftLowerLeg.Transparency = 0
character.Tail:Destroy()
end
end
end
Also you may want to move the tail to the players position before adding to workspace. This can help to keep the character from being moved toward the tail in game. Which I have had some issues with in my games
Clone:SetPrimaryPartCFrame(character.HumanoidRootPart.CFrame)
Clone.Parent = character
Can you post the line that defines “Tails”?
How are the welds set up on the tail model itself?
Does this occur in studio with simulated clients and on an actual server?
I had an issue similar to this a while ago attaching backpacks to the player. The tail is just a model, right? It might be better to use an accessory and attachment.