Hey! im trying to make a script, that if you touch it, you swin. i tried this script but it didnt work? does someone have any solutions?
script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:WaitForChild("Humanoid")
if humanoid then
humanoid:ChangeState(Enum.HumanoidStateType.Swimming, true)
end
end)